Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upShortest Path in a Matrix using recursion and backtracking. #1632
Comments
|
@akshat-fsociety please assign this to me |
|
@yashbansal130 This issue has been resolved refer PR #1633 . If you feel anything missing drop a message here. |
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},