Citi interview question

Basic array manipulation and matrix operation for coding