Python can't handle deep recursion even after setting the recursion limit

Правка en3, от Moody_in_a_hoodie, 2020-07-14 23:30:07

for context: problem link :link my solution :link 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.

Теги #recursion, #python3, #dfs and similar, #graph theory

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский Moody_in_a_hoodie 2020-07-14 23:31:10 7 Tiny change: '6856021)\nGot RE i' -> '6856021)\n\nGot RE i'
en3 Английский Moody_in_a_hoodie 2020-07-14 23:30:07 31
en2 Английский Moody_in_a_hoodie 2020-07-14 23:15:56 4 Tiny change: 'e problem is I guess i' -> 'e problem I guess i'
en1 Английский Moody_in_a_hoodie 2020-07-14 23:00:15 931 Initial revision (published)