NeetCode #636LC-2290HardAdvanced Graphs
← Back to All Problems#636 · #2290 · Minimum Obstacle Removal to Reach Corner(到达角落需要移除障碍物的最小数目)
📌 Problem Statement & Constraints
You are given an
m x n grid where 0 is empty and 1 is an obstacle. You may move in the four cardinal directions; moving into an obstacle removes it (cost 1), and moving into an empty cell is free. Return the minimum obstacles removed to reach the bottom-right from the top-left. Constraints: 1 <= m, n <= 10^5, 2 <= m * n <= 10^5.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!