Back to problems

Robot Room Cleaner: Find Target

Algorithm · Meta · Hard

Design an algorithm that directs a robot through a room whose dimensions are not known beforehand. The robot begins at an unspecified location inside the room. No room layout is available, and the walls have not been revealed. The robot may use only these environment APIs: move(): Attempts to advance one cell. It returns True when the path is clear and the robot moves; if blocked, it returns False. turnLeft() / turnRight(): Turns the robot 90 degrees to the left or right.…

Checking your access…