Back to Freecodecamp

Problem 215: Crack-free Walls

curriculum/challenges/english/blocks/project-euler-problems-201-to-300/5900f4431000cf542c50ff56.md

latest1.0 KB
Original Source

--description--

Consider the problem of building a wall out of 2×1 and 3×1 bricks (horizontal×vertical dimensions) such that, for extra strength, the gaps between horizontally-adjacent bricks never line up in consecutive layers, i.e. never form a "running crack".

For example, the following 9×3 wall is not acceptable due to the running crack shown in red:

There are eight ways of forming a crack-free 9×3 wall, written $W(9,3) = 8$.

Calculate $W(32,10)$.

--hints--

crackFreeWalls() should return 806844323190414.

js
assert.strictEqual(crackFreeWalls(), 806844323190414);

--seed--

--seed-contents--

js
function crackFreeWalls() {

  return true;
}

crackFreeWalls();

--solutions--

js
// solution required