Recursion overblow

1
2
3
4
5
def fun(p,q):
    if p==0:
        return q
    else:
        return fun(p-1, p+q)

Given the above function what is the value of fun(10000, 9950)?

×

Problem Loading...

Note Loading...

Set Loading...