Programming
December 29, 2023Programming
December 29, 2023Data-Structures
Question 49 |
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
X – 1 Y – 2 Z – 3 | |
X – 3 Y – 1 Z – 2 | |
X – 3 Y – 2 Z – 1 | |
X – 2 Y – 3 Z – 1 |
Question 49 Explanation:
Stack is used in depth first search.
Queue is used in breadth-first search.
Heap is used in heap.
Queue is used in breadth-first search.
Heap is used in heap.
Correct Answer: C
Question 49 Explanation:
Stack is used in depth first search.
Queue is used in breadth-first search.
Heap is used in heap.
Queue is used in breadth-first search.
Heap is used in heap.