Files
gikf eef1805fe6 fix(curriculum): clean-up Project Euler 201-220 (#42826)
* fix: clean-up Project Euler 201-220

* fix: corrections from review

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2021-07-15 09:20:31 +02:00

47 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4431000cf542c50ff56
title: 'Problem 215: Crack-free Walls'
challengeType: 5
forumTopicId: 301857
dashedName: problem-215-crack-free-walls
---
# --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:
<img class="img-responsive center-block" alt="9x3 wall with one lined up gap between horizontally-adjacent bricks" src="https://cdn.freecodecamp.org/curriculum/project-euler/crack-free-walls.gif" style="background-color: white; padding: 10px;">
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
```