Frage im Vorstellungsgespräch bei Bossa Nova Robotics

Coding recursion question. Shortest path to destination