The most appropriate matching for the following pairs
X: depth first search 1: heap Y: breadth-first search 2: queue Z: sorting 3: stack
is (GATE CS 2000):
(A) X—1 Y—2 Z-3
(B) X—3 Y—1 Z-2
(C) X—3 Y—2 Z-1
(D) X—2 Y—3 Z-1
Answer: (C)
Explanation: Stack is used for Depth first Search
Queue is used for Breadth First Search
Heap is used for sorting
Quiz of this Question
Recommended Posts:
- Data Structures | Misc | Question 1
- Data Structures | Misc | Question 2
- Data Structures | Misc | Question 3
- Data Structures | Misc | Question 4
- Data Structures | Misc | Question 5
- Data Structures | Misc | Question 7
- Data Structures | Misc | Question 8
- Data Structures | Misc | Question 9
- Data Structures | Misc | Question 10
- Introduction to Data Structures | 10 most commonly used Data Structures
- C | Misc | Question 1
- C | Misc | Question 2
- C | Misc | Question 7
- C | Misc | Question 6
- C | Misc | Question 5
- C | Misc | Question 7
- C | Misc | Question 6
- C | Misc | Question 8
- C | Misc | Question 9
- Algorithms | Misc | Question 16

