Algorithms, Depth First Search, Breadth First Search, Graph, Data Structures.
then we keep track of 3’s neighbors. Now, we plan to visit neighbors of ‘2’ and then to neighbors of ‘3’ and so on., Algorithm a) Select a vertex from a graph as the source vertex s. b) Put s onto a FIFO queue, and mark s as visited. c) Repeat this until queue is empty: (i) remove the least