Serko Interview Question

Some BFS/DFS graph question of matrices.