2. Number tower

2. Number tower#

../../_images/number_tower.jpg

Number tower#

The image above illustrates an number tower.

You need to move from top to the bottom, and each time you have to choose only one path and add the number altogether, of which the largest number is called the length of this number tower.

Write an program to create a number tower and find out its length.

Tips: You can use recursion to calculate from the bottom, length function, which caculate the maximum of length of the lower left number and lower right, and recurs to the upper floor.