help me!
what’s wrong with my code.
Expand the pond
bhiya can you create new link as this link not saved.
thank you bhiya 
1 Like
the value of m and n is 1000 is wort case it is not accept it shows TLE
can you back track it in recurion only
@sutharp777
Just keep a vector of pair. Push all points in it which have been visited in current movement and set them to 1.
I would like to point out one thing though. Your code currently has worst case N^2 complexity where N = n*m
You need to find a N complexity solution.
1 Like