Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2184. Number of Ways to Build Sturdy Brick Wall
Count how many ways to build an h-row wall of given width by arranging bricks in each row (bricks of integer lengths summing to the width) so that there is no vertical seam running uninterrupted from top to bottom. Key idea: enumerate valid row seam patterns, treat two rows as compatible if they have no common seam positions, and count height-h sequences of compatible rows via DP or matrix exponentiation (modulo a large prime).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.