Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Golden Pyramid by nesterione
def count_gold(pyramid):
mw = lambda p,x,y: p[y][x] if len(p)<=(y+1) else p[y][x]+max(mw(p,x,y+1), mw(p,x+1,y+1))
return mw(pyramid,0,0)
March 24, 2015