Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
DP solution in Clear category for Golden Pyramid by spoty
def count_gold(pyramid):
run = [0]
for row in pyramid:
run = [gold + max(run[i - 1], run[i])
for i, gold in enumerate(row)] + [0]
return max(run)
Feb. 1, 2015
Comments: