Question 16106 – GATE 2022
December 12, 2023
Question 1770 – Nielit Scientific Assistance IT 15-10-2017
December 12, 2023
Question 16106 – GATE 2022
December 12, 2023
Question 1770 – Nielit Scientific Assistance IT 15-10-2017
December 12, 2023

Question 1588 – Nielit Scientist-B IT 22-07-2017

what are the appropriate data structures for graph traversal using Breadth First Search(BFS) and Depth First Search(DFS) algorithms?

Correct Answer: B

Question 4 Explanation: 
● Depth First Search (DFS) algorithm traverses a graph in a depthward motion and uses a stack to remember to get the next vertex to start a search, when a dead end occurs in any iteration.
● Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a ‘search key’), and explores all of the neighbor nodes at the present depth prior to moving on to the nodes at the next depth level.
A
Stack for BFS and Queue for DFS
B
Queue for BFS and Stack for DFS
C
Stack for BFS and Stack for DFS
D
Queue for BFS and Queue for DFS

Leave a Reply

Your email address will not be published. Required fields are marked *