SNSOCIAL- Can someone tell me what is wrong in this code?


#1

please someone tell me why this code is not printing anything?
link to my code


#2

you should pop the element from the queue everytime


#3

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.


#4

I think i did in this line
Point point= que.removeFirst();


#5

ok i got your point that should be inside the loop, thank you


#6

yeah that should be inside the loop