Implementation of well-known sorting algorithms:
- Bubble sort
- Insertion sort
- Merge sort
- Quicksort (2 versions, one using a partition function)
- Selection sort
Each program runs a couple of test cases and also verifies if the input array is sorted.
Let's use QuickSort.java as an example. Create a directory called 'Sorting', which is the package name.
- Type 'javac QuickSort.java' to generate QuickSort.class file.
- Copy the class file to directory 'Sorting'.
- Type 'java Sorting.QuickSort' to run the program.