IBM interview question

Matrix related. Questions and array