Pergunta de entrevista da empresa Amazon

Algo and DS. Treasure map. Finding the shortest route.