L56LABY - EDITORIAL

Avoid repeated processing of same position.

Editorialist’s solution is commented.

Check for i>0 before accessing its neighbours.

Figured it out last night. Still thank you. Silly mistake!

why every solution which is implemented using recursion giving tle in this question?

I am getting Partial correct …please help me with this

Link Link