Pegasystems interview question

1 question on recursion which was a medium level leetcode problem