Amazon Interview Question

Graph Problems using DFS or BFS traversal