IT IS NKNIGHT PROBLEM. I AM GIVING THE LINK OF MY CODE. PLS COPY THE LINK AND OPEN IN THE NEW TAB.
PLS TELL ME WHAT IS WRONG IN MY CODE .
CODE NOT GIVING REQUIRED OUTPUT
int r = row+rows[i];//define r
int c =col+cols[i]; // define c
if(r>=0 && r<box.length && c>=0 && c<box[0].length){
if(box[r][c]){
return false;
}
}
if this solves your doubt please mark it as resolved 
i am not getting it what you are trying top say
here is you corrected code
code should givi 36 output but mam your is giving 412 output.pls check
you need to change ‘hh’ size accordingly
for 3
boolean[][] hh=new boolean[3][3];
will give 36
thank you mam . i got my answer
great
please mark your doubt as resolved