Problem Description
Given N x N matrix filled with 0, 1, 2, 3.
Find whether there is a path possible from source to destination, traversing through blank cells only.
You can traverse up, down, right, and left. Return a single integer 1 if a path exists, otherwise 0.
A = [[1, 0], [0, 2]]
Input 2:
A = [[1, 3], [3, 2]]
0
Output 2:
1
The source is blocked by walls on all its sides. So, there is no way to reach the destination.
Explanation 2:
We can take any possible path to reach the destination from the source.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.