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

Shortest Path in a Matrix using recursion and backtracking. #1632

Open
akshat-fsociety opened this issue Oct 6, 2020 · 2 comments
Open

Shortest Path in a Matrix using recursion and backtracking. #1632

akshat-fsociety opened this issue Oct 6, 2020 · 2 comments

Comments

@akshat-fsociety
Copy link

@akshat-fsociety akshat-fsociety commented Oct 6, 2020

For Maze give below the shortest path would be 16 from (0,0) to (8,0)

Test Case 1:
{ 1, 1, 1, 1, 1, 0, 0, 1, 1, 1 },
{ 0, 1, 1, 1, 1, 1, 0, 1, 0, 1 },
{ 0, 0, 1, 0, 1, 1, 1, 0, 0, 1 },
{ 1, 0, 1, 1, 1, 0, 1, 1, 0, 1 },
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 1 },
{ 1, 0, 1, 1, 1, 0, 0, 1, 1, 0 },
{ 0, 0, 0, 0, 1, 0, 0, 1, 0, 1 },
{ 0, 1, 1, 1, 1, 1, 1, 1, 0, 0 },
{ 1, 1, 1, 1, 1, 0, 0, 1, 1, 1 },
{ 0, 0, 1, 0, 0, 1, 1, 0, 0, 1 },

For Maze give below the shortest path would be 5 from (0,0) to (2,3)

Test Case 2:
{1,1,0,0},
{0,1,1,0},
{0,0,1,1},

@yashbansal130
Copy link

@yashbansal130 yashbansal130 commented Oct 13, 2020

@akshat-fsociety please assign this to me

@akshat-fsociety
Copy link
Author

@akshat-fsociety akshat-fsociety commented Oct 14, 2020

@yashbansal130 This issue has been resolved refer PR #1633 . If you feel anything missing drop a message here.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.