This repository contains a list of different types of sorting techniques:
On the other hand, I have compared all the types of sorting techniques. The type of comparison that we can see here is:
- Testing all the types of a sort on a random array.
- Testing all the types of sorting on N randomly generated array and taking out average.
To compare and to calculate the time taken by them we need some more small classes which are:
- Timer (To capture time taken to perform any task in nanoseconds)
- Shuffle (To generate a random array for a given length)
- Stats (To store all times and calculate an average value from it)
- CompareSorts (To compare between different sorting techniques on a random array)
- Test (To run a single/multiple sorts on N random arrays of a given size and keep their average)
- Sort (An interface that works as the parent for all the sort types)
- ArraySort (A class that used to duplicate Java's array sort as a child of Sort)
- Order (An enum to decide in which order we want to sort the array)