https://www.spoj.com/problems/ACODE/
My code is working for the given test case in pycharm. And it is showing NZEC run time error and I find it difficult to identify the error. Could anyone help me to find out this error? my code
facebook.py (743 Bytes)
Did you test it with a 5000 digit string?
for string size of 5000, RecursionError: maximum recursion depth exceeded in comparison
You could try increasing the stack size.
Thanks for your reply the problem is accepted. I tried an iterative approach