10 lines
238 B
Text
10 lines
238 B
Text
pp2(Row, Column, Sum, Tri, M) =>
|
|
if Sum > M.get(max_val,0) then
|
|
M.put(max_val,Sum)
|
|
end,
|
|
Row := Row + 1,
|
|
if Row <= Tri.length then
|
|
foreach(I in 0..1)
|
|
pp2(Row,Column+I, Sum+Tri[Row,Column+I], Tri, M)
|
|
end
|
|
end.
|