TLE and wrong answer

my code is giving me TLE. please tell me what I am doing wrong

hello @D19APPND0003
try using vector in place of map.

so my logic ic correct ?

yeah in the problem u need to apply bfs only

I am still getting TLE. code :- https://repl.it/@mohdimran001/BFS#main.cpp

image
in place of u it should be v.

also in place of x it should be m

rest everthing looks correct to me

Hey, i made some changes to your code.
It is working now.