All mock tests are FREE till 31 December — register to save your progress

Match the following with respect to algorithm paradigms :

Figure

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. (a) (b) (c) (d) (iv) (iii) (ii) (i)

Explanation

8-queens: backtracking (iv). Single-source shortest paths (Dijkstra): greedy (iii). Strassen: divide and conquer (ii). Optimal BST: dynamic programming (i).

More Data Structures and Algorithms questions