The problem statement can be found on Leetcode at the following link:
https://leetcode.com/problems/robot-room-cleaner/
Given a robot cleaner in a room modeled as a grid.
Each cell in the grid can be empty or blocked.
The robot cleaner with 4 given APIs can move forward, turn left or turn right. Each turn it made is 90 degrees.
When it tries to move into a blocked cell, its bumper sensor detects the obstacle and it stays on the current cell.
----------------------------------------------------------------
Design an algorithm to clean the entire room using only the 4 given APIs shown below.
Join our 30-days online course to prepare for coding interviews of companies like Google, Amazon, Facebook, Microsoft, etc.
Course On Coding: http://www.ritambhara.in/big-o/
Course On System Design: http://www.ritambhara.in/system-design-for-coding-interview/
We have our office in Greater Noida (India) where we run courses for students to prepare them for placements in Top IT companies. For Placement Preparation and Industrial Training call us.
Call: +91-8377803450
Email: [email protected]
Call us to conduct a workshop in your college campus.
Buy our books and prepare for coding interviews on your own.
https://www.amazon.in/Kamal-Rawat/e/B0765VFLKD/ref=dp_byline_cont_book_2
For detailed discussions on Interview Questions visit:
http://www.ritambhara.in/