Flood Fill Algorithm giving TLE


Whats wrong in my code??

please check out this code

I am not asking for the solution,that I can get easily.Just tell me the mistakes in my code,that would really help.

Yeah,this is the same approach I used.What is the mistake??

Still can’t figure out how can you people become TA.


sir aap update nhi kar rahe the DP matrix