UGC-NET Jan 2017 · Divide & Conquer: Mergesort

MCQ · 2 marks · Problem PROG-DIVC-0019

Match the following with respect to algorithm paradigms : $\begin{array}{clcl} & \textbf{List-I} & {} & \textbf{List-II} \\ \text{a.} & \text{Merge sort} & \text{i.} & \text{Dynamic programming}  \\  \text{b.} & \text{Huffman coding} & \text{ii.} & \text{Greedy approach} \\ \text{c.} & \text{Optimal polygon triangulation} & \text{iii.} & \text{Divide and conquer} \\ \text{d.} & \text{Subset sum problem} & \text{iv.} & \text{Back tracking} \\  \end{array}$ $\textbf{Codes :}$
  1. A
    $\text{a-iii, b-i, c-ii, d-iv}$
  2. B
    $\text{a-ii, b-i, c-iv, d-iii}$
  3. C
    $\text{a-ii, b-i, c-iii, d-iv}$
  4. D
    $\text{a-iii, b-ii, c-i, d-iv}$

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutiona. Merge sort splits the array, sorts the halves recursively and merges: divide and conquer, a-iii.b. Huffman coding repeatedly merges the two least frequent symbols: greedy, b-ii.c. Optimal polygon triangulation combines optimal sub-polygon solutions in a table: dynamic programming, c-i.d. Subset sum is classically solved by backtracking over include/exclude choices: d-iv.The code a-iii, b-ii, c-i, d-iv is option D.Answer: D

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com