Which of the following algorithms is an example of the divide and conquer…
2023
Which of the following algorithms is an example of the divide and conquer approach?
Answer: B. Quick sort — Quick sort is a divide-and-conquer algorithm: it partitions the array and recursively sorts the subarrays.
- A.
Matrix-chain multiplication
- B.
Quick sort
- C.
Prim's algorithm
- D.
Longest common subsequence
Attempted by 967 students.
Show answer & explanation
Correct answer: B
Quick sort is a divide-and-conquer algorithm: it partitions the array and recursively sorts the subarrays.
Loading lesson…