Back to problems

Robot Navigation in an Unknown Grid

Algorithm · LinkedIn · Hard

You are given a robot placed in an unexplored grid that contains walls and empty cells. The robot starts at a specified coordinate (startX, startY) facing north. You must navigate it to a destination coordinate (targetX, targetY) by issuing commands. The full grid layout is unknown; the robot can only interact with the environment through a provided API that allows rotation, forward movement, wall detection, and teleportation to previously visited cells. Your task is to…

Checking your access…