Pregunta de entrevista de Roblox

Shortest path through graph problem