I am running into buffer overflow with the following solution to https://leetcode.com/problems/shortest-path-in-a-grid-with-obstacles-elimination/
class Solut