Quick Sort Algorithm in Java
Quick sort algorithm is a kind of divide and conquer algoritm. Quick sort is also known as Partition-exchange sort. There are three important elements in the quick sort.
- Pivot element
- Elements that are less than pivot
- Elements that are greater than pivot
Algorithm changes wrt to selection of the pivot. There are different approaches while selecting the pivot.