Only one test case is passing . getting run-error in all other test cases.
code link:- https://ide.codingblocks.com/s/182058
Only one test case is passing . getting run-error in all other test cases.
code link:- https://ide.codingblocks.com/s/182058
hey @Arshdeep-Singh-2077522698966208 your logic seems fine its just that your java scanner is not able to scan 2d char array .try running your code for sample test case you will get the error.
@Arshdeep-Singh-2077522698966208 try this for scanning:
for(int i=0;i<n;i++) {
String str=s.next();
for(int j=0;j<m;j++) {
maze[i][j]=str.charAt(j);
}
}