Adopted new convention from template
This commit is contained in:
parent
fea1ad18e0
commit
fddc440fee
@ -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])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user