← All problemsSign in

803. Bricks Falling When Hit

LeetCodeArrayUnion-FindMatrixOpen on judge ↗

You are given an m x n binary grid, where each 1 represents a brick and 0 represents an empty space. A brick is stable if: - It is directly connected to the top of the grid, or - At least one other brick in its four adjacent cells is stable. You are also given an array hits, which is a sequence of erasures we want to apply. Each time we want to erase the brick at the location hits[i] = (rowi, c

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