Pergunta de entrevista da empresa Maze

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