← All problemsSign in

2290. Minimum Obstacle Removal to Reach Corner

LeetCodeArrayBreadth-First SearchGraph TheoryHeap (Priority Queue)MatrixShortest PathOpen on judge ↗

You are given a 0-indexed 2D integer array grid of size m x n. Each cell has one of two values: - 0 represents an empty cell, - 1 represents an obstacle that may be removed. You can move up, down, left, or right from and to an empty cell. Return the minimum number of obstacles to remove so you can move from the upper left corner (0, 0) to the lower right corner (m - 1, n - 1). Example 1: I

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start