Quick sort
Quick sort
Definition
• Quick sort is a fast sorting algorithm used to sort a list of elements.
• The quick sort algorithm attempts to separate the list of elements into
two parts and then sort each part recursively. That means it use divide
and conquer strategy.
In quick sort, the partition of the list is performed based on the
element called pivot. Here pivot element is one of the elements in the
list.
• The list is divided into two partitions such that "all elements to the
left of pivot are smaller than the pivot and all elements to the right of
pivot are greater than or equal to the pivot".
Step by Step Process