/pyramid-slide-down

Primary LanguageTypeScriptMIT LicenseMIT

pyramid-slide-down

Write an algorithm that computes the maximum sum of consecutive numbers from the top to the bottom of the pyramid, e.g.:

Input:

   3
  7 4
 4 2 3
6 5 9 3

Output: 3 + 7 + 2 + 9 = 21.