Pregunta de entrevista de Maze

How would I test the algorithm of finding 2 closest nodes in a graph