Maximum triangle path sum: Difference between revisions
m
Better use of pattern matching rules to avoid calling tl().
(Erlang version) |
m (Better use of pattern matching rules to avoid calling tl().) |
||
Line 985:
fold_row([], L) -> L;
fold_row([A|_] = Last, [B|
[A+B | fold_rest(Last,
fold_rest([A], [B]) -> [A+B];
fold_rest([A1
</lang>
{{Out}}
|