Pergunta de entrevista da empresa Daily Rounds

Question realted to arrays and recursion.