Domanda di colloquio di American Express

Why is it not good to use recursion here ?