IBM interview question

Basic coding and arrays. Some dsa