Amazon Interview Question

graphs, bfs ,dfs, recursions and 2 pointers