Gemalto Interview Question

Some tricky programming questions based on recursion.