Let's begin!
Quick Sort is a sorting algorithm which follows the principle of Divide and Conquer with average time complexity as n(log n) and worst time complexity as n^2.
We have two functions to implement Quick Sort:
Quick Sort Functions
- quickSort( ) Recursively call the function until start is less than end.
- partition( ) Swap elements to left which are less than pivot and brings pivot to it's ideal position.
Comments
Post a Comment