Google interview question

The first one was a LeetCode Easy problem about finding a path in a