Deloitte interview question

Basic coding questions from arrays