Recursive solution with arguments row and col initialized to 0. solution in Clear category for Golden Pyramid by Phil15
def count_gold(pyramid, row=0, col=0):
"""Return max possible sum in a path from top to bottom"""
return pyramid[row][col] + max(
count_gold(pyramid, row+1, col),
count_gold(pyramid, row+1, col+1))
April 7, 2018