Anonymous user
Maximum triangle path sum: Difference between revisions
m
→{{header|REXX}}: replaced a comment with more accurate wording. -- ~~~~
m (→{{header|REXX}}: added comments to the REXX section header. -- ~~~~) |
m (→{{header|REXX}}: replaced a comment with more accurate wording. -- ~~~~) |
||
Line 215:
do r=rows by -1 to 2; p=r-1 /*traipse through triangle rows. */
do k=1 for p; kn=k+1 /*re-calculate the previous row. */
#.p.k=max(#.r.k, #.r.kn) + #.p.k /*
end /*k*/
end /*r*/
|