Welcome to Day 52 of the DSA Coding Challenge:
Todays Goals:
Question 1:BFS - Adj List and Adj Matrix
You are given an undirected graph stored
as an adjacency list
as an adjacency Matrix.
Write functions to traverse this graph using the Breadth first Search approach. As you traverse the graph store the values of the vertices in an array and return this array.
Question 2:DFS - Iterative and Recursive
You are given a graph stored as an adjacency list. Write functions to traverse the graph using the Depth first Search approach
1) recursively and
2) iteratively.
As you traverse the graph store the values of the vertices in an array and return this array.
All the best!