Pergunta de entrevista da empresa Microsoft

A problem based on tracing shortest path in a graph