Match List-I with List-II and select the correct answer using the codes given below the Lists:
Match List-I with List-II and select the correct answer using the codes given below the Lists:
List-I
A. All-pairs shortest path
B. Quicksort
C. Minimum weight spanning tree
D. Connected components
List-II
1. Greedy
2. Depth-first search
3. Dynamic programming
4. Divide and conquer
Codes: A B C D
Show answerHide answer
Correct answer: (B) 3 4 1 2
Explanation
All-pairs shortest path (Floyd-Warshall) uses dynamic programming, quicksort uses divide and conquer, minimum spanning tree (Prim/Kruskal) is greedy, and connected components are found with DFS. That gives 3, 4, 1, 2.