Pregunta de entrevista de Google

Basic programming questions can be solved using BFS.