What is Quick sort?
The Quick sort algorithm is of the divide and conquer type.
That means it works by reducing a sorting problem into several easier sorting problems and solving each of them.
A dividing value is chosen from the input data, and the data is partitioned into three sets: elements that belong before the dividing value, the value itself, and elements that come after the dividing value.
The partitioning is performed by exchanging elements that are in the first set but belong in the third with elements that are in the third set but belong in the first Elements that are equal to the dividing element can be put in any of the three sets the algorithm will still work properly.
Recent Comments