BlackRock Interview Question

Find the target value in 2D grid.