Google Interview Question

Matrix manipulation