Quick Sort

Logic: Create a pivot element & arrange elements with two partitions, If the elements are lesser than pivot add it to left partition & if elements bigger than the pivot arrange it to right side of partition & make call recursively with the subarray found with same approach. Time Complexity: Avg O(n^2) .. Best: O(n …

Quick Sort Read More »