Pregunta de entrevista de BrowserStack

Use recursion in the following code