Skip to content

Instantly share code, notes, and snippets.

View DomNomNom's full-sized avatar

DomNomNom DomNomNom

View GitHub Profile
@DomNomNom
DomNomNom / big.py
Created August 1, 2014 11:36 — forked from anonymous/big.py
# a recursive function that produces big numbers. What is the time complexity of this?
def big(a, b, depth):
if depth == 0:
return a*b # assume this takes one unit of time
out = 1
for i in xrange(b): # repeat the following b times
out = big(a, out, depth-1)
return out