Pregunta de entrevista de Meta

BFS Tree algorithm question, graph question