First solution in Clear category for Golden Pyramid by
This function will first change the tupple into a list which isn't immutable
Next it will compute, for each column of the pyramid the maximum value of each case.
pyramid = [list(p) for p in pyramid]
for j in range(len(pyramid)-2, -1, -1):
for i in range(len(pyramid[j])):
pyramid[j][i]+= pyramid[j+1][i] if pyramid[j+1][i] > pyramid[j+1][i+1] else pyramid[j+1][i+1]
May 1, 2014