Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Approach #2

Open
sToor16 opened this issue May 7, 2019 · 1 comment
Open

Incorrect Approach #2

sToor16 opened this issue May 7, 2019 · 1 comment

Comments

@sToor16
Copy link

sToor16 commented May 7, 2019

The approach is incorrect. We need to consider obstacles.

@hansrajdas
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants