Barclays Interview Question

Solve algorithms using recursion