for context:↵
problem link :[ link](https://codeforces.com/contest/580/problem/C](http://)↵
my solution :[link](https://codeforces.com/contest/580/submission/86856021](http://) Got RE in 35th case↵
the python AC submissions for this problem are executed using bfs.↵
I looked at some AC submissions in c++. looks like the logic is same. So the problem I guess is with python.↵
↵
lets say I avoid recursive implementation and go for iterative ones..for example Bfs over dfs. but is it even possible in all cases?↵
And also if you can provide a feasible way to execute deep recursions without runtime error I will be extremely grateful. ↵
↵
Please don't suggest to learn C++ right now. I know it is a great language. But I just can't afford the time now. I am currently working on learning new skills that will help me in web dev. I hope you understand my position.↵
↵
problem link :[
my solution :[link](https://codeforces.com/contest/580/submission/86856021
the python AC submissions for this problem are executed using bfs.↵
I looked at some AC submissions in c++. looks like the logic is same. So the problem I guess is with python.↵
↵
lets say I avoid recursive implementation and go for iterative ones..for example Bfs over dfs. but is it even possible in all cases?↵
And also if you can provide a feasible way to execute deep recursions without runtime error I will be extremely grateful. ↵
↵
Please don't suggest to learn C++ right now. I know it is a great language. But I just can't afford the time now. I am currently working on learning new skills that will help me in web dev. I hope you understand my position.↵
↵