This repository contains Java implementations of various sorting algorithms. The algorithms are all implemented as static methods in their respective class files, and can be called by typing [sort type].sort(int[] array).
The available sorting algorithms are:
- Bubble Sort
- Count Sort
- Flash Sort
- Heap Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Radix Sort
- Radix Sort (base 256)
- Selection Sort
The Main class allows you to select the sorting algorithm and the number of elements in the array to be sorted. You can also choose the type of shuffling for the array (sorted, reversed, shuffled) and see a sample of the array before and after sorting to verify that the sort was successful. The Main class also displays the time taken for the sorting algorithm to run, and allows you to repeat the sort multiple times to measure the average time taken.
The repository also includes a file called Tests.txt which compares the performance of the various sorting algorithms on arrays of different sizes range from 10^5 to 10^8 elements and are repeated to measure the average time taken for each algorithm.