Google interview question

(on the phone screen, my code was written on a Google Doc that was setup by the interviewer) Design a simple algorithm for a room cleaning robot, and ask as many questions as you need.

Interview Answer

Anonymous

23 Jun 2017

I started by asking about the shape of the room, and if there are any obstacles. I explored the limitations of the robot that I had to consider (returning to it's base station, dumping what it had collected). Most of the technical challenges were dismissed but we talked about approaches to deal with each. Once the final set of criteria was defined I wrote a Java interface that matched the capabilities and wrote a Java class that implemented this interface. I interpreted this to be a test of completeness and thoughtfulness as well as a final "can I really code" demonstration. This did not feel like a test of implementing some domain specific strategy or reciting a path finding algorithm from memory.