Pregunta de entrevista de PayPal

Recursive programming question in react.