Meta interview question

Matrix problem and string manipulation