Minimum Obstacle Removal to Reach Corner - Leetcode 2290 - Python