Maximum triangle path sum: Difference between revisions
→Functional (ES5)
Line 724:
}
// Evaluating from bottom up (right fold)
// and with recursion left to right (head and first item of tail at each stage)
return foldr1(
function (xs, ys) {
Line 753 ⟶ 755:
]
)[0];
▲})();</lang>
{{out}}
|