Algorithm
Quick Sort Algorithm:
- Start with an unsorted array.
- Select a "pivot" element from the array.
- Partition the array into two subarrays:
- Elements smaller than the pivot are placed in the left subarray.
- Elements larger than the pivot are placed in the right subarray.
- Recursively apply Quick Sort to the left and right subarrays.
- Combine the subarrays and pivot to form the sorted array.
Example:

Fig. 1: Iteration by Iteration Visualization of Quick Sort
Note: Quick Sort is an efficient in-place sorting algorithm, particularly effective for large datasets.