IBM interview question

Array question and data structures question