Domanda di colloquio di GlobalLogic

they asked me to write some codes using recursion.