Domanda di colloquio di Infosys

Coding question for a pattern with recursive nature