Question 2

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
  1. A2 4 1 3
  2. B3 4 1 2
  3. C3 4 2 1
  4. D4 1 2 3
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.

From DSSSB TGT Computer Science Practice Set 4

This is question 2 of DSSSB TGT Computer Science Practice Set 4. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.