Algorithm design technique used in quicksort algorithm is?
View worked solution
Answer: C
The Quicksort algorithm is a classic example of the Divide and Conquer algorithmic paradigm. It works by breaking down a problem into smaller subproblems, solving them recursively, and then combining the results:
- Divide: Partition the array into two subarrays around a chosen pivot element , such that all elements in the left subarray are less than or equal to , and all elements in the right subarray are greater than .
- Conquer: Recursively sort the left and right subarrays using the same quicksort procedure.
- Combine: Since the partitioning and sorting are done in-place, no explicit combination step is required; the entire array becomes sorted.
Thus, the correct option is C.
Free practice · Your answers on this page are not saved.
