Pergunta de entrevista da empresa Kohl's

1 question from Facebook Hackthon. 2 easy question one on recursion and other on array