Write down a function to calculate the following recurrence by using dynamic programming. PN = PN-1 + 2PN-2, with P1 = P0 = 1. Write down a function which takes the tree (a link to the root) as the parameter. Tree's item type is int. Function must return number of leaves in the tree.