Kiewit Corporation interview question

An easy grid-based leetcode problem