How to check left diagonal

Bhaiyaa meko yaha doubt hai ki left diagonal ke lia x=i-1 aur y=j-1 raahega na instead of i anfd j kyuki hame jo hamara cell hai (i,j) uske left wala adjacent diagonal mai jana hoga to i-1 and j-1 karege na par code mai to decremeent nahi kiya gaya hai.
Can you please explain this to me ?
Thanks :slight_smile:

yeah what you are saying is correct. board[i][j] will always be 0 since then only we are checking for safeBoard hence here this is getting ignored. So you can start x and y from either of them it won’t affect the solution.

1 Like

thanks, got the logic

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.