Cadence Design Systems interview question

Basic computations on trees with recursion