Amazon Interview Question

cleaning robot problem