Adopted new convention from template

This commit is contained in:
David Doblas Jiménez 2022-09-26 20:45:42 +02:00
parent fea1ad18e0
commit fddc440fee

View File

@ -45,6 +45,7 @@ def compute():
Find the maximum total from top to bottom of the triangle above Find the maximum total from top to bottom of the triangle above
""" """
for i in reversed(range(len(triangle) - 1)): for i in reversed(range(len(triangle) - 1)):
for j in range(len(triangle[i])): for j in range(len(triangle[i])):
triangle[i][j] += max(triangle[i + 1][j], triangle[i + 1][j + 1]) triangle[i][j] += max(triangle[i + 1][j], triangle[i + 1][j + 1])