please someone tell me why this code is not printing anything?
link to my code
you should pop the element from the queue everytime
1 Like
Well, to be honest I do not like that line “if((x+row[k])>=0 && (x+row[k])<n && (y+col[k])>=0 &&(y+col[k])<m && (visited[x+row[k]][y+col[k]])==0)” I think that esaytyper is somewhere here. Usually in such long lines we do a lot of typos, so check everything once again please.
I think i did in this line
Point point= que.removeFirst();
ok i got your point that should be inside the loop, thank you
yeah that should be inside the loop