NeetCode #107LC-554MediumArrays & Hashing
← Back to All Problems

#107 · #554 · Brick Wall(砖墙)

📌 Problem Statement & Constraints

There is a rectangular brick wall made of rows of bricks of varying widths but the same height. Draw a vertical line from the top to the bottom that crosses the fewest bricks. Return that minimum number. The line must not run along an edge at either end of the wall. Constraints: 1 <= wall.length <= 10^4, 1 <= wall[i].length <= 10^4, 1 <= wall[i][j] <= 2^31 - 1.
🔒

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!