GATE / CS ARCHIVE

GATE CSE 1994 / QUESTION 1.19

Quicksort design strategy

Algorithms · Divide & Conquer · Full GATE CSE 1994 paper

GATE 1994, Q1.19 MCQ
Report issue

Divide & Conquer

Question 1.19, GATE 1994: Does quicksort use dynamic programming, backtracking, divide and conquer, or greedy design?
Question 1.19, GATE 1994: Does quicksort use dynamic programming, backtracking, divide and conquer, or greedy design?
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Quicksort chooses a pivot, partitions the input into regions ordered relative to it, and recursively sorts those smaller regions. The resulting subproblem solutions combine to give the sorted whole, so the design is divide and conquer. It does not cache overlapping subproblems as dynamic programming does, and it does not search and undo candidate solutions as backtracking does. Good or bad pivot choices affect the balance and complexity, not this classification.

Original paper, page 2