fix(curriculum): clean-up Project Euler 161-180 (#42782)

* fix: clean-up Project Euler 161-180

* fix: corrections from review

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

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
gikf
2021-07-12 16:19:03 +02:00
committed by GitHub
parent 4307179d00
commit 32fac23a2d
20 changed files with 230 additions and 139 deletions

View File

@ -12,18 +12,24 @@ A triomino is a shape consisting of three squares joined via the edges.
There are two basic forms:
<img class="img-responsive center-block" alt="two basic triominoes forms" src="https://cdn.freecodecamp.org/curriculum/project-euler/triominoes-1.gif" style="background-color: white; padding: 10px;">
If all possible orientations are taken into account there are six:
<img class="img-responsive center-block" alt="triominoes forms including orientation" src="https://cdn.freecodecamp.org/curriculum/project-euler/triominoes-2.gif" style="background-color: white; padding: 10px;">
Any n by m grid for which nxm is divisible by 3 can be tiled with triominoes. If we consider tilings that can be obtained by reflection or rotation from another tiling as different there are 41 ways a 2 by 9 grid can be tiled with triominoes:
<img class="img-responsive center-block" alt="animation showing 41 ways of filling 2x9 grid with triominoes" src="https://cdn.freecodecamp.org/curriculum/project-euler/triominoes-3.gif" style="background-color: white; padding: 10px;">
In how many ways can a 9 by 12 grid be tiled in this way by triominoes?
# --hints--
`euler161()` should return 20574308184277972.
`triominoes()` should return `20574308184277972`.
```js
assert.strictEqual(euler161(), 20574308184277972);
assert.strictEqual(triominoes(), 20574308184277972);
```
# --seed--
@ -31,12 +37,12 @@ assert.strictEqual(euler161(), 20574308184277972);
## --seed-contents--
```js
function euler161() {
function triominoes() {
return true;
}
euler161();
triominoes();
```
# --solutions--