CPP program for the above approach
#include <bits/stdc++.h> NEW_LINE using namespace std ; int uniquePathsWithObstacles ( vector < vector < int > > & A ) { int r = A . size ( ) ; int c = A [ 0 ] . size ( ) ;