can anybody why i got WA in pretest 2
problem:Kick Start - Google’s Coding Competitions
my solution:https://pastebin.com/TBuFMrBd
in the condition of while loop you kept !visited[x][y] && x<n && y<n
if x or y go out of bounds , it is not checked .
try changing condition to x<n && y<n && !visited[x][y]
Still getting WA