iRobot Interview Question

Design a homing algorithm for the robot