Pregunta de entrevista de Visa Inc.

One LC hard question, then coding pair was a LC medium with recursion