27 27 votes 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}$$$\text{A-2 B-4 C-1 D-3}$$\text{A-3 B-4 C-1 D-2}$$\text{A-3 B-4 C-2 D-1}$$\text{A-4 B-1 C-2 D-3}$ Algorithms gate1997 algorithms normal algorithm-design-techniques easy match-the-following + – Kathleen 8.7k views answer comment Share Follow Print See 1 comment 1 1 comment reply ankitrokdeonsns commented Oct 12, 2014 i moved by Puja Mishra Jan 6, 2018 reply Follow flag answer B 11 11 replyShare Please log in or register to add a comment.
Best answer 27 27 votes 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. https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm#History_and_naming https://en.wikipedia.org/wiki/Quicksort#Algorithm https://en.wikipedia.org/wiki/Minimum_spanning_tree#Algorithms https://en.wikipedia.org/wiki/Connected_component_(graph_theory)#Algorithms SiddharthMahapatra answered Aug 14, 2017 • edited Jul 1, 2019 by Lakshman Bhaiya SiddharthMahapatra comment Share Follow See all 5 Comments 5 5 Comments reply Sandeep Suri commented Jan 9, 2018 reply Follow flag We can find MST using BFS /greedy not DFS but yes we can find connected components using DFS 0 0 replyShare air1ankit commented Jan 15, 2018 reply Follow flag please explain the concept of " connected component" ..? 0 0 replyShare akshay7797 commented Mar 25, 2020 reply Follow flag air1ankit https://www.geeksforgeeks.org/connected-components-in-an-undirected-graph/ 1 1 replyShare air1ankit commented Mar 25, 2020 reply Follow flag already done ... thanks ; 0 0 replyShare pavansan commented Dec 31, 2024 reply Follow flag +1 0 0 replyShare Please log in or register to add a comment.
1 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" air1ankit answered Feb 7, 2018 air1ankit comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes A-3 B-4 C-1 D-2 manikantsharma answered Jul 2, 2018 manikantsharma comment Share Follow 0 reply Please log in or register to add a comment.