Pregunta de entrevista de Microsoft

Traverse graph using a non-standard algorithm (interviewer explained the algorithm), then make sure that solution is m/t safe