Skip to content

Instantly share code, notes, and snippets.

View naeemark's full-sized avatar
🎯
Focusing

Naeem naeemark

🎯
Focusing
View GitHub Profile
@justjkk
justjkk / ack_short.py
Created May 20, 2010 18:43
Ackermann Function in python
import sys
count=0
sys.setrecursionlimit(50000)
cache={}
def a(m,n):
global count
global cache
count=count+1
if cache.has_key(m) and cache[m].has_key(n):
return cache[m][n]