Block Interview Question

2D dynamic programming style chess question