The Gateway to Computer Science Excellence
+19 votes
1.4k views

The correct matching for the following pairs is$$\begin{array}{ll|ll}\hline \text{A.} & \text{All pairs shortest path} & \text{1.} & \text{Greedy} \\\hline  \text{B.} & \text{Quick Sort} & \text{2.}& \text{Depth-First Search} \\\hline   \text{C.}& \text{Minimum weight spanning tree} & \text{3.}  & \text{Dynamic Programming} \\\hline  \text{D.} & \text{Connected Components} &\text{4.}  & \text{Divide and Conquer}  \\\hline \end{array}$$

  1. $\text{A-2 B-4 C-1 D-3}$

  2. $\text{A-3 B-4 C-1 D-2}$

  3. $\text{A-3 B-4 C-2 D-1}$

  4. $\text{A-4 B-1 C-2 D-3}$

in Algorithms by Veteran (52.2k points)
edited by | 1.4k views
+10
answer B

3 Answers

+17 votes
Best answer
Answer : (B) A-3 B-4 C-1 D-2$$\begin{array}{|ll|ll|}\hline \text{A.} & \text{All pairs shortest path} & \text{3.} & \text{Dynamic Programming} \\\hline  \text{B.} & \text{Quick Sort} & \text{2.}& \text{Divide and Conquer} \\\hline   \text{C.}& \text{Minimum weight spanning tree} & \text{1.}  & \text{Greedy} \\\hline  \text{D.} & \text{Connected Components} &\text{2.}  & \text{Depth-First Search}  \\\hline \end{array}$$

Reference: Read the Intro/Algo Sub-Heading.

by Active (1.7k points)
edited by
0
We can find  MST using BFS /greedy not DFS but yes we can find connected components using DFS
0
please explain the concept of " connected component" ..?
+1 vote
1- All pair shortest path ------> dynamic programing

2-quick sort --------> divide and conquer

3-MST ----------->Greedy technique

4- connected component ------>Depth-First search

 

*Answer will be "b"
by Active (4.7k points)
0 votes
A-3

B-4

C-1

D-2
by (431 points)
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,291 answers
198,211 comments
104,903 users