Liftoff interview question

Solve a matrix problem on CoderPad