Google Interview Question

Matrix manipulation , hash mapping