QuickSort and MergeSort in JAVA


QuickSort is a very famous sort algorithm, Arrays.sort is realized by QuickSort.


The basic method is following:
1. Choosing a pivot, always the lowest value.
2. Dividing the array into two parts, the lower part will be put left of the pivot, and the larger part is right.
3. With each round, the pivot will move to the final position in the array.
4. Repeat the process, until the sort is completed.

Continue reading “QuickSort and MergeSort in JAVA”