Sorting methods used:
-> Java's built-in from --> java.util.Arrays;
-> Bubble Sorting
-> Insertion Sorting
-> Quick Sorting
-> Heap Sorting
Output:
---------------------------------------------
Java's built-in sort took 4965500 nanoseconds.
Bubble sort took 42621125 nanoseconds.
Insertion sort took 271750 nanoseconds.
Quick sort took 2742250 nanoseconds.
Conclusion: Insertion Sort and QuickSort typically fall in range of x < 1000 of eachother,
while bubble-sort takes the most amount of time, typically being over five times as longer
than insertion and quick sorting!
-
Notifications
You must be signed in to change notification settings - Fork 0
LydiaAlem/Comparing-Sorting-Methods
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A side project I completed where I test different sorting methods and tracked how long they took using java’s built in features!
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published