Find Path through grid – constrained motion

Introduction This is another addition to the backtracking series of problems. The problem is asked in many interviews in many different forms. Here are few of them: Given a grid where few of the cells are blocked. You have a robot placed at the top left corner of the grid. Find path through grid such that the robot starts from the top left corner and moves to the bottom right corner. Another form just asks for all possible paths from one cell to another into a grid. Of course there are constraints on the movement of the robot, else you would end up going in circles and the paths wo...
Read More