Pergunta de entrevista da empresa Serko

Some BFS/DFS graph question of matrices.