Google interview question

Matrix manipulation