Amazon Interview Question

Graph based DFS or BFS quetsions