Pergunta de entrevista da empresa Accenture Solutions

2 coding questions based on array