algorithms.tutorialhorizon.com

Dynamic Programming - Count all paths in 2D Matrix with Obstructions in it | Algorithms

Given two dimensional matrix, write an algorithm to count all possible paths from top left corner to bottom-right corner. You are allowed to move only in two directions, move right OR move down. There are few obstructions as well, means few cells are blocked and you cannot travel that cell. Many times this problem is being referred as "Robot Travel Problem". Given a 2d matrix, how many ways a robot can travel from top left corner to bottom right corner and there are few cells in which robot cannot travel.