2322. Number of Ways to Build Sturdy Brick Wall

Medium
Array
Dynamic Programming
Bit Manipulation
Bitmask

Description

Hints

Hint 1
A row of bricks can be represented uniquely by the points where two bricks are joined together.
Hint 2
For a given row of bricks, how many configurations of bricks could you have put below this row such that the wall is sturdy?
Hint 3
Use dynamic programming to store the number of possible sturdy walls with a given height and configuration of bricks on the top row.

Statistics

Acceptance
49.4%
Submissions
20,152
Accepted
9,965