Incorrect Approach
sToor16 opened this issue · 1 comments
sToor16 commented
The approach is incorrect. We need to consider obstacles.
hansrajdas commented
Thanks Shubhpreet for reporting this issue. Yes, you are right this is not the correct approach, we have to take care of the assumption that robot can only go on flat areas(that is on 1s) not on trenches(represented by 0).
I think, using DP with memoization will solve this problem.
Unfortunately, i will have to have remove this code snippet as i got a notice from DMCA.
Sorry for responding so late.
Thanks!