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?
- A.
Matrix-chain multiplication
- B.
Quick sort
- C.
Prim's algorithm
- D.
Longest common subsequence
Attempted by 167 students.
Show answer & explanation
Correct answer: B
Quick sort is a divide-and-conquer algorithm: it partitions the array and recursively sorts the subarrays.