it is giving the correct result for this sample test case but this is not the correct implementation .
it will definitely fall for many test cases .
Im not able to pass 2d array in function
it worked thanx sir
sir the code that u have send me if i change a size more than 20 20 its shows ing lots of compile error and on submitting my solution with 20 20 size it shows core dumped exe error
sir see the chat…
Please paste your code here
Also its giving error for >20x20 because acc to constraint max size can be 30x30
Here did the changes in your code and mentioned the changes in comments : https://ide.codingblocks.com/s/356605 
sir passes two test cases but not passing test case 0 due to some run time error
refer to this…
Hey @mdhammad139
If this is resolvd then please mark it so 
Otherwise let me know the issue you are facing
thanx sir u explained well
1 Like