chore(i18n,learn): processed translations (#50940)

This commit is contained in:
camperbot
2023-07-10 22:35:26 +05:30
committed by GitHub
parent 1d257e950e
commit df45166564
96 changed files with 294 additions and 414 deletions

View File

@@ -41,22 +41,22 @@ Find the maximum total from top to bottom of the triangle below:
# --hints--
`maximumPathSumI(testTriangle)` should return a number.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumI(testTriangle) === 'number');
assert(typeof maximumPathSumI(_testTriangle) === 'number');
```
`maximumPathSumI(testTriangle)` should return 23.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumI(testTriangle), 23);
assert.strictEqual(maximumPathSumI(_testTriangle), 23);
```
`maximumPathSumI(numTriangle)` should return 1074.
`maximumPathSumI([[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]])` should return 1074.
```js
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
assert.strictEqual(maximumPathSumI(_numTriangle), 1074);
```
# --seed--
@@ -64,7 +64,9 @@ assert.strictEqual(maximumPathSumI(numTriangle), 1074);
## --before-user-code--
```js
const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _testTriangle = [[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]];
```
## --seed-contents--
@@ -74,13 +76,6 @@ function maximumPathSumI(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumI(testTriangle);
```
# --solutions--

View File

@@ -25,13 +25,13 @@ Find the maximum total from top to bottom in `numTriangle`, a 2D array defined i
# --hints--
`maximumPathSumII(testTriangle)` should return a number.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumII(_testTriangle) === 'number');
```
`maximumPathSumII(testTriangle)` should return 23.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumII(_testTriangle), 23);
@@ -62,13 +62,6 @@ function maximumPathSumII(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumII(testTriangle);
```
# --solutions--

View File

@@ -41,22 +41,22 @@ Find the maximum total from top to bottom of the triangle below:
# --hints--
`maximumPathSumI(testTriangle)` should return a number.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumI(testTriangle) === 'number');
assert(typeof maximumPathSumI(_testTriangle) === 'number');
```
`maximumPathSumI(testTriangle)` should return 23.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumI(testTriangle), 23);
assert.strictEqual(maximumPathSumI(_testTriangle), 23);
```
`maximumPathSumI(numTriangle)` should return 1074.
`maximumPathSumI([[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]])` should return 1074.
```js
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
assert.strictEqual(maximumPathSumI(_numTriangle), 1074);
```
# --seed--
@@ -64,7 +64,9 @@ assert.strictEqual(maximumPathSumI(numTriangle), 1074);
## --before-user-code--
```js
const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _testTriangle = [[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]];
```
## --seed-contents--
@@ -74,13 +76,6 @@ function maximumPathSumI(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumI(testTriangle);
```
# --solutions--

View File

@@ -25,13 +25,13 @@ Find the maximum total from top to bottom in `numTriangle`, a 2D array defined i
# --hints--
`maximumPathSumII(testTriangle)` should return a number.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumII(_testTriangle) === 'number');
```
`maximumPathSumII(testTriangle)` should return 23.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumII(_testTriangle), 23);
@@ -62,13 +62,6 @@ function maximumPathSumII(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumII(testTriangle);
```
# --solutions--

View File

@@ -41,22 +41,22 @@ Find the maximum total from top to bottom of the triangle below:
# --hints--
`maximumPathSumI(testTriangle)` should return a number.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumI(testTriangle) === 'number');
assert(typeof maximumPathSumI(_testTriangle) === 'number');
```
`maximumPathSumI(testTriangle)` should return 23.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumI(testTriangle), 23);
assert.strictEqual(maximumPathSumI(_testTriangle), 23);
```
`maximumPathSumI(numTriangle)` should return 1074.
`maximumPathSumI([[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]])` should return 1074.
```js
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
assert.strictEqual(maximumPathSumI(_numTriangle), 1074);
```
# --seed--
@@ -64,7 +64,9 @@ assert.strictEqual(maximumPathSumI(numTriangle), 1074);
## --before-user-code--
```js
const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _testTriangle = [[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]];
```
## --seed-contents--
@@ -74,13 +76,6 @@ function maximumPathSumI(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumI(testTriangle);
```
# --solutions--

View File

@@ -25,13 +25,13 @@ Find the maximum total from top to bottom in `numTriangle`, a 2D array defined i
# --hints--
`maximumPathSumII(testTriangle)` should return a number.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumII(_testTriangle) === 'number');
```
`maximumPathSumII(testTriangle)` should return 23.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumII(_testTriangle), 23);
@@ -62,13 +62,6 @@ function maximumPathSumII(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumII(testTriangle);
```
# --solutions--

View File

@@ -41,22 +41,22 @@ Find the maximum total from top to bottom of the triangle below:
# --hints--
`maximumPathSumI(testTriangle)` should return a number.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumI(testTriangle) === 'number');
assert(typeof maximumPathSumI(_testTriangle) === 'number');
```
`maximumPathSumI(testTriangle)` should return 23.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumI(testTriangle), 23);
assert.strictEqual(maximumPathSumI(_testTriangle), 23);
```
`maximumPathSumI(numTriangle)` should return 1074.
`maximumPathSumI([[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]])` should return 1074.
```js
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
assert.strictEqual(maximumPathSumI(_numTriangle), 1074);
```
# --seed--
@@ -64,7 +64,9 @@ assert.strictEqual(maximumPathSumI(numTriangle), 1074);
## --before-user-code--
```js
const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _testTriangle = [[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]];
```
## --seed-contents--
@@ -74,13 +76,6 @@ function maximumPathSumI(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumI(testTriangle);
```
# --solutions--

View File

@@ -25,13 +25,13 @@ Find the maximum total from top to bottom in `numTriangle`, a 2D array defined i
# --hints--
`maximumPathSumII(testTriangle)` should return a number.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumII(_testTriangle) === 'number');
```
`maximumPathSumII(testTriangle)` should return 23.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumII(_testTriangle), 23);
@@ -62,13 +62,6 @@ function maximumPathSumII(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumII(testTriangle);
```
# --solutions--

View File

@@ -30,7 +30,7 @@ Reiche deine Seite ein, wenn du davon ausgehst, alles richtig gemacht zu haben.
# --hints--
Modules should be present.
Module sollten vorhanden sein.
```js
async (getUserInput) => {

View File

@@ -16,7 +16,7 @@ The basic path this kind of authentication will follow in your app is:
4. The user is then returned to your app at a specific callback url with their profile if they are approved.
5. They are now authenticated, and your app should check if it is a returning profile, or save it in your database if it is not.
Strategies with OAuth require you to have at least a *Client ID* and a *Client Secret* which is a way for the service to verify who the authentication request is coming from and if it is valid. These are obtained from the site you are trying to implement authentication with, such as GitHub, and are unique to your app--**THEY ARE NOT TO BE SHARED** and should never be uploaded to a public repository or written directly in your code. Eine gängige Praxis ist es, sie in die `.env`-Datei zu packen und sie wie folgt zu referenzieren: `process.env.GITHUB_CLIENT_ID`. For this challenge you are going to use the GitHub strategy.
Strategies with OAuth require you to have at least a *Client ID* and a *Client Secret* which is a way for the service to verify who the authentication request is coming from and if it is valid. These are obtained from the site you are trying to implement authentication with, such as GitHub, and are unique to your app--**THEY ARE NOT TO BE SHARED** and should never be uploaded to a public repository or written directly in your code. Eine gängige Praxis ist es, sie in die `.env`-Datei zu packen und sie wie folgt zu referenzieren: `process.env.GITHUB_CLIENT_ID`. Für diese Herausforderung wirst du die GitHub-Strategie verwenden.
Follow <a href="https://www.freecodecamp.org/news/how-to-set-up-a-github-oauth-application/" target="_blank" rel="noopener noreferrer nofollow">these instructions</a> to obtain your *Client ID and Secret* from GitHub. Set the homepage URL to your Replit homepage (**not the project code's URL**), and set the callback URL to the same homepage URL with `/auth/github/callback` appended to the end. Save the client ID and your client secret in your project's `.env` file as `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET`.
@@ -31,7 +31,7 @@ app.route('/login')
});
```
Reiche deine Seite ein, wenn du davon ausgehst, alles richtig gemacht zu haben. If you're running into errors, you can <a href="https://forum.freecodecamp.org/t/advanced-node-and-express/567135#implementation-of-social-authentication-3" target="_blank" rel="noopener noreferrer nofollow">check out the project up to this point</a>.
Reiche deine Seite ein, wenn du davon ausgehst, alles richtig gemacht zu haben. Wenn du auf Fehler stößt, kannst du <a href="https://forum.freecodecamp.org/t/advanced-node-and-express/567135#implementation-of-social-authentication-3" target="_blank" rel="noopener noreferrer nofollow">das Projekt bis zu diesem Punkt überprüfen</a>.
# --hints--

View File

@@ -24,7 +24,7 @@ Wählen den Minimalbereich (3. Parameter) aus, damit der Test immer bestanden wi
# --hints--
Alle Tests sollten bestanden werden.
All tests should pass.
```js
(getUserInput) =>

View File

@@ -1,6 +1,6 @@
---
id: 587d824d367417b2b2512c54
title: Use Regular Expressions to Test a String
title: Verwende reguläre Ausdrücke um einen String zu testen
challengeType: 2
forumTopicId: 301608
dashedName: use-regular-expressions-to-test-a-string

View File

@@ -1,6 +1,6 @@
---
id: 5e601c0d5ac9d0ecd8b94afe
title: American British Translator
title: Amerikanisch-Britischer Übersetzer
challengeType: 4
forumTopicId: 462358
dashedName: american-british-translator

View File

@@ -17,7 +17,7 @@ p {
}
```
Create a new CSS rule that targets the `h1` element, and set its `text-align` property to `center`.
Erstelle eine neue CSS-Regel, die das `h1`-Element auswählt, und setze ihre `text-align`-Eigenschaft auf `center`.
# --hints--

View File

@@ -7,7 +7,7 @@ dashedName: step-30
# --description--
Erstelle einen `h2, h3, h4, h5, h6`-Selektor. Give it a `font-family` property set to `Raleway` with a fallback of `sans-serif`.
Erstelle einen `h2, h3, h4, h5, h6`-Selektor. Weise ihm eine `font-family`-Eigenschaft zu, die auf `Raleway` mit einem Fallback von `sans-serif` gesetzt ist.
# --hints--

View File

@@ -17,19 +17,19 @@ Du solltest den `.beak.top`-Selektor verwenden.
assert.match(code, /\.beak\.top\s*\{/);
```
You should give `.beak.top` a `width` of `--fcc-expected--`, but found `--fcc-actual--`.
Du solltest `.beak.top` eine `width` von `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('.beak.top')?.width, '20%');
```
You should give `.beak.top` a `top` of `--fcc-expected--`, but found `--fcc-actual--`.
Du solltest `.beak.top` eine `top` von `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('.beak.top')?.top, '60%');
```
You should give `.beak.top` a `left` of `--fcc-expected--`, but found `--fcc-actual--`.
Du solltest `.beak.top` eine `left` von `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('.beak.top')?.left, '40%');

View File

@@ -29,7 +29,7 @@ You should give `.beak.bottom` a `top` of `--fcc-expected--`, but found `--fcc-a
assert.equal(new __helpers.CSSHelp(document).getStyle('.beak.bottom')?.top, '65%');
```
You should give `.beak.bottom` a `left` of `--fcc-expected--`, but found `--fcc-actual--`.
Du solltest `.beak.bottom` eine `left` von `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('.beak.bottom')?.left, '42%');

View File

@@ -17,7 +17,7 @@ You should give `.shirt` a `top` of `--fcc-expected--`, but found `--fcc-actual-
assert.equal(new __helpers.CSSHelp(document).getStyle('.shirt')?.top, '165px');
```
You should give `.shirt` a `left` of `--fcc-expected--`, but found `--fcc-actual--`.
Du solltest `.shirt` eine `left` von `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('.shirt')?.left, '127.5px');

View File

@@ -13,7 +13,7 @@ Füge ein `id`-Attribut mit dem Wert `indoor` zum Radio-Button hinzu. Wenn Eleme
# --hints--
Your radio button should still be located between the opening and closing tags of the `label` element.
Dein Radio-Button sollte immer noch zwischen dem öffnenden und abschließenden Tag des `label`-Elements stehen.
```js
const labelChildNodes = [...$('form > label')[0].childNodes];

View File

@@ -7,7 +7,7 @@ dashedName: step-43
# --description--
Obwohl du deinen Knopf unter der Texteingabe hinzugefügt hast, erscheinen sie auf der Seite nebeneinander. That's because both `input` and `button` elements are <dfn>inline elements</dfn>, which don't appear on new lines.
Obwohl du deinen Knopf unter der Texteingabe hinzugefügt hast, erscheinen sie auf der Seite nebeneinander. Das liegt daran, dass sowohl `input`- als auch `button`-Elemente <dfn>Inline-Elemente</dfn> sind, die nicht in neuen Zeilen erscheinen.
The button you added will submit the form by default. Allerdings kann es zu Verwechslungen kommen, wenn man sich auf das Standardverhalten verlässt. Füge das `type`-Attribut mit dem Wert `submit` zum `button` hinzu, um klarzustellen, dass es sich um einen Bestätigungsbutton handelt.

View File

@@ -18,13 +18,13 @@ Du solltest den `label`-Selektor verwenden.
assert.exists(new __helpers.CSSHelp(document).getStyle('label'));
```
You should add a `display` property of value `block`.
Du solltest eine `display`-Eigenschaft mit dem Wert `block` hinzufügen.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('label')?.display, 'block');
```
You should add a `margin` property of value `0.5rem 0`.
Du solltest eine `margin`-Eigenschaft mit dem Wert `0.5rem 0` hinzufügen.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('label')?.margin, '0.5rem 0px');

View File

@@ -7,11 +7,11 @@ dashedName: step-19
# --description--
Specifying the `type` attribute of a form element is important for the browser to know what kind of data it should expect. If the `type` is not specified, the browser will default to `text`.
Damit der Browser weiß, welche Art von Daten er erwarten soll, ist es wichtig, das `type`-Attribut eines Formular-Elements anzugeben. Wenn der `type` nicht angegeben ist, wird der Browser dem Attribut standardmäßig `text` als Wert zuweisen.
Weise den ersten zwei `input`-Elementen ein `type`-Attribut von `text`, dem dritten ein `type`-Attribut von `email` und dem vierten ein `type`-Attribut von `password` zu.
The `email` type only allows emails with a `@` and a `.` in the domain. Der `password`-Typ verdeckt die Eingabe und warnt, wenn die Seite kein HTTPS verwendet.
Der `email`-Typ erlaubt nur E-Mails mit einem `@` und einem `.` in der Domain. Der `password`-Typ verdeckt die Eingabe und warnt, wenn die Seite kein HTTPS verwendet.
# --hints--
@@ -33,7 +33,7 @@ Du solltest dem dritten `input`-Element ein `type`-Attribut von `email` zuweisen
assert.equal(document.querySelectorAll('input')?.[2]?.type, 'email');
```
You should give the fourth `input` element a `type` attribute of `password`.
Du solltest dem vierten `input`-Element ein `type`-Attribut von `password` zuweisen.
```js
assert.equal(document.querySelectorAll('input')?.[3]?.type, 'password');

View File

@@ -19,7 +19,7 @@ Du solltest drei `label`-Elemente zum zweiten `fieldset` hinzufügen.
assert.equal(document.querySelectorAll('fieldset')?.[1]?.querySelectorAll('label')?.length, 3);
```
The `label` elements should be siblings.
Die `label`-Elemente sollten verschwistert sein.
```js
assert.exists(document.querySelector('fieldset:nth-child(2)')?.querySelector('label + label + label'));

View File

@@ -7,19 +7,19 @@ dashedName: step-33
# --description--
Adding a dropdown to the form is easy with the `select` element. The `select` element is a container for a group of `option` elements, and the `option` element acts as a label for each dropdown option. Both elements require closing tags.
Mit dem `select`-Element kann man dem Formular leicht einen Dropdown hinzufügen. Das `select`-Element ist ein Container für eine Gruppe von `option`-Elementen und das `option`-Element fungiert als Label für jede Dropdown-Option. Both elements require closing tags.
Start by adding a `select` element below the two `label` elements. Then nest 5 `option` elements within the `select` element.
# --hints--
You should add a `select` element to the third `fieldset`.
Du solltest ein `select`-Element zum dritten `fieldset` hinzufügen.
```js
assert.exists(document.querySelector('fieldset:nth-child(3) > select'));
```
You should nest 5 `option` elements inside the `select` element.
Du solltest 5 `option`-Elemente innerhalb des `select`-Elements einbetten.
```js
assert.equal(document.querySelectorAll('fieldset:nth-child(3) > select > option')?.length, 5);

View File

@@ -9,17 +9,17 @@ dashedName: step-57
With a `display` of `block` the submit button sits flush against the left edge of its parent.
Use the same technique used to center the `form` to center the submit button.
Verwende das gleiche Verfahren, dass beim Zentrieren der `form` verwendet wurde, um den Bestätigungsbutton zu zentrieren.
# --hints--
You should give the submit button a `margin` of `0 auto`.
Du solltest dem Bestätigungsbutton eine `margin` von `0 auto` zuweisen.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('input[type="submit"]')?.margin, '0px auto');
```
You should not give the submit button a `min-width` or `max-width`.
Du solltest dem Bestätigungsbutton keine `min-width` oder `max-width` zuweisen.
```js
assert.isEmpty(new __helpers.CSSHelp(document).getStyle('input[type="submit"]')?.minWidth);

View File

@@ -7,7 +7,7 @@ dashedName: step-31
# --description--
Use an id selector to style the element with the id `tan-table`. Give it a `width` of `450px`, a `height` of `140px`, and a `background-color` of `#D2691E`.
Verwende einen ID-Selektor, um das Element mit der ID `tan-table` zu gestalten. Give it a `width` of `450px`, a `height` of `140px`, and a `background-color` of `#D2691E`.
# --hints--

View File

@@ -7,7 +7,7 @@ dashedName: step-39
# --description--
Move the `#black-character` element into place by setting the `position` to `absolute`, the `top` to `30%`, and the `left` to `59%`.
Verschiebe das `#black-character`-Element auf seinen Platz, indem du die `position` auf `absolute`, `top` auf `30%` und `left` auf `59%` setzt.
# --hints--

View File

@@ -7,7 +7,7 @@ dashedName: step-52
# --description--
Select the element with the id `blue-left` using an id selector. Weise ihm eine `width` von `500px` und eine `height` von `300px` zu.
Wähle mit einem ID-Selektor das Element mit der ID `blue-left` aus. Weise ihm eine `width` von `500px` und eine `height` von `300px` zu.
# --hints--

View File

@@ -7,7 +7,7 @@ dashedName: step-60
# --description--
Erstelle drei `div`-Elemente innerhalb deines `#guitar`-Elements. Give the first two a `class` value of `guitar`. Weise dann dem ersten eine `id` von `guitar-left` und dem zweiten eine `id` von `guitar-right` zu. Füge eine `id` zum dritten `div` mit dem Wert `guitar-neck` hinzu.
Erstelle drei `div`-Elemente innerhalb deines `#guitar`-Elements. Weise den ersten zwei eine `class` mit dem Wert `guitar` zu. Weise dann dem ersten eine `id` von `guitar-left` und dem zweiten eine `id` von `guitar-right` zu. Füge eine `id` zum dritten `div` mit dem Wert `guitar-neck` hinzu.
Das dritte `div` sollte keine `guitar`-Klasse enthalten.

View File

@@ -17,7 +17,7 @@ Dein `.triangle`-Selektor sollte eine `border-style`-Eigenschaft auf `solid` ges
assert(new __helpers.CSSHelp(document).getStyle('.triangle')?.borderStyle === 'solid');
```
Your `.triangle` selector should have a `border-width` property set to `42px 45px 45px 0`.
Dein `.triangle`-Selektor sollte eine `border-width`-Eigenschaft von `42px 45px 45px 0` enthalten.
```js
assert(new __helpers.CSSHelp(document).getStyle('.triangle')?.borderWidth === '42px 45px 45px 0px');

View File

@@ -7,7 +7,7 @@ dashedName: step-71
# --description--
Target the element with the id `triangles` using an id selector. Setze die `width` auf `250px` und die `height` auf `550px`.
Wähle mit einem ID-Selektor das Element mit der ID `triangles` aus. Setze die `width` auf `250px` und die `height` auf `550px`.
# --hints--
@@ -17,13 +17,13 @@ Du solltest einen `#triangles`-Selektor hinzufügen.
assert(new __helpers.CSSHelp(document).getStyle('#triangles'));
```
Your `#triangles` selector should have a `width` property set to `250px`.
Dein `#triangles`-Selektor sollte eine `width`-Eigenschaft mit dem Wert `250px` enthalten.
```js
assert(new __helpers.CSSHelp(document).getStyle('#triangles')?.width === '250px');
```
Your `#triangles` selector should have a `height` property set to `550px`.
Dein `#triangles`-Selektor sollte eine `height`-Eigenschaft mit dem Wert `550px` enthalten.
```js
assert(new __helpers.CSSHelp(document).getStyle('#triangles')?.height === '550px');

View File

@@ -7,7 +7,7 @@ dashedName: step-11
# --description--
Within each of your new `th` elements, nest a `span` element with the `class` set to `sr-only year`. Weise ihnen den folgenden Text zu (in Reihenfolge): `2019`, `2020`, und `2021`.
Bette innerhalb jedes deiner neuen `th`-Elemente ein `span`-Element mit der `class` `sr-only year` ein. Weise ihnen den folgenden Text zu (in Reihenfolge): `2019`, `2020`, und `2021`.
Weise deinem dritten `th`-Element das `class`-Attribut mit dem Wert `current` zu.

View File

@@ -7,9 +7,9 @@ dashedName: step-14
# --description--
In your second `tr` element, add a `th` element with the text `Checking Our primary transactional account.`. Wrap that text, except for `Checking`, in a `span` element with the `class` attribute set to `description`.
Füge innerhalb deines zweiten `tr`-Elements ein `th`-Element mit dem Text `Checking Our primary transactional account.` hinzu. Wrap that text, except for `Checking`, in a `span` element with the `class` attribute set to `description`.
Following that, add three `td` elements with the following text (in order): `$54`, `$56`, `$53`. Give the third `td` element a `class` attribute set to `current`.
Füge daraufhin drei `td`-Elemente mit dem folgenden Text hinzu (in Reihenfolge): `$54`, `$56`, `$53`. Weise dem dritten `td`-Element ein `class`-Attribut mit dem Wert `current` zu.
# --hints--
@@ -25,7 +25,7 @@ Dein `th`-Element sollte den Text `Checking Our primary transactional account.`
assert(document.querySelector('tbody')?.querySelectorAll('tr')?.[1]?.querySelector('th')?.innerText === 'Checking Our primary transactional account.');
```
You should wrap the text `Our primary transactional account.` in a `span` element.
Du solltest den Text `Our primary transactional account.` in einem `span`-Element einbetten.
```js
assert(document.querySelector('tbody')?.querySelectorAll('tr')?.[1]?.querySelector('th > span')?.textContent === 'Our primary transactional account.');

View File

@@ -13,7 +13,7 @@ Füge anschließend drei `td`-Elemente mit dem folgendem Text hinzu (in dieser R
# --hints--
Your third `tr` should have a `th` element.
Dein drittes `tr` sollte ein `th`-Element enthalten.
```js
assert(document.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelector('th'));

View File

@@ -9,7 +9,7 @@ dashedName: step-22
Füge innerhalb des zweiten `tr` ein `th`-Element mit dem Text `Expenses Annual anticipated expenses, such as payroll.` hinzu. Wrap that text, except for `Expenses`, within a `span` element with the `class` set to `description`.
Add three `td` elements below that, and give them the following text, in order: `$200`, `$300`, and `$400`. Give the third `td` element a `class` set to `current`.
Füge drei `td`-Elemente unter diesem hinzu und weise ihnen den folgenden Text in Reihenfolge zu: `$200`, `$300` und `$400`. Weise dem dritten `td`-Element eine `class` zu, die auf `current` gesetzt ist.
# --hints--
@@ -25,7 +25,7 @@ Dein `th`-Element sollte den Text `Expenses Annual anticipated expenses, such as
assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[1]?.querySelector('th')?.innerText === 'Expenses Annual anticipated expenses, such as payroll.');
```
You should wrap the text `Annual anticipated expenses, such as payroll.` in a `span` element.
Du solltest den Text `Annual anticipated expenses, such as payroll.` mit einem `span`-Element umschließen.
```js
assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[1]?.querySelector('th > span')?.textContent === 'Annual anticipated expenses, such as payroll.');

View File

@@ -9,17 +9,17 @@ dashedName: step-23
Füge innerhalb des dritten `tr` ein `th`-Element mit dem Text `Credit The outstanding balance on our credit card.` hinzu. Wrap that text, except for `Credit`, within a `span` element with the `class` set to `description`.
Add three `td` elements below that, and give them the following text, in order: `$50`, `$50`, and `$75`. Give the third `td` element a `class` set to `current`.
Füge drei `td`-Elemente unter diesem hinzu und weise ihnen den folgenden Text in Reihenfolge zu: `$50`, `$50` und `$75`. Weise dem dritten `td`-Element eine `class` zu, die auf `current` gesetzt ist.
# --hints--
Your third `tr` should have a `th` element.
Dein drittes `tr` sollte ein `th`-Element enthalten.
```js
assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelector('th'));
```
Your `th` element should have the text `Credit The outstanding balance on our credit card.`.
Dein `th`-Element sollte den Text `Credit The outstanding balance on our credit card.` enthalten.
```js
assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelector('th')?.innerText === 'Credit The outstanding balance on our credit card.');
@@ -43,7 +43,7 @@ Du solltest drei `td`-Elemente haben.
assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelectorAll('td').length === 3);
```
Your first `td` element should have the text `$50`.
Dein erstes `td`-Element sollte den Text `$50` enthalten.
```js
assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[2]?.querySelectorAll('td')?.[0]?.textContent === '$50');

View File

@@ -41,7 +41,7 @@ ths?.forEach(th => {
});
```
Each of your new `span` elements should have the `class` attribute set to `sr-only`.
Jedes deiner neuen `span`-Elemente sollte das `class`-Attribut auf `sr-only` gesetzt haben.
```js
const ths = [...document.querySelectorAll('table')?.[2]?.querySelectorAll('th')];

View File

@@ -7,7 +7,7 @@ dashedName: step-31
# --description--
Die `clip`-CSS-Eigenschaft wird verwendet, um die sichtbaren Teile eines Elements zu definieren. Set the `span[class~="sr-only"]` selector to have a `clip` property of `rect(1px, 1px, 1px, 1px)`.
Die `clip`-CSS-Eigenschaft wird verwendet, um die sichtbaren Teile eines Elements zu definieren. Stelle deinen `span[class~="sr-only"]`-Selektor so ein, dass er eine `clip`-Eigenschaft mit `rect(1px, 1px, 1px, 1px)` als Wert besitzt.
Die `clip-path`-Eigenschaft bestimmt die Form, die die `clip`-Eigenschaft annehmen soll. Set the `clip-path` property to the value of `inset(50%)`, forming the clip-path into a rectangle within the element.

View File

@@ -11,13 +11,13 @@ Jetzt musst du diese Elemente verkleinern. Weise deinem `span[class~="sr-only"]`
# --hints--
Your `span[class~="sr-only"]` selector should have a `width` property set to `1px`.
Dein `span[class~="sr-only"]`-Selektor sollte eine `width`-Eigenschaft mit dem Wert `1px` enthalten.
```js
assert(new __helpers.CSSHelp(document).getStyle('span[class~="sr-only"]')?.getPropertyValue('width') === '1px');
```
Your `span[class~="sr-only"]` selector should have a `height` property set to `1px`.
Dein `span[class~="sr-only"]`-Selektor sollte eine `height`-Eigenschaft mit dem Wert `1px` enthalten.
```js
assert(new __helpers.CSSHelp(document).getStyle('span[class~="sr-only"]')?.getPropertyValue('height') === '1px');

View File

@@ -7,7 +7,7 @@ dashedName: step-33
# --description--
To prevent the text content from overflowing, give your `span[class~="sr-only"]` selector an `overflow` property set to `hidden` and a `white-space` property set to `nowrap`.
Weise deinem `span[class~="sr-only"]`-Selektor eine `overflow`-Eigenschaft mit dem Wert `hidden` und eine `white-space`-Eigenschaft mit dem Wert `nowrap` zu, um zu verhindern, dass der Textinhalt überlastet wird.
# --hints--

View File

@@ -7,7 +7,7 @@ dashedName: step-35
# --description--
Time to style your table heading. Erstelle einen `h1`-Selektor. Weise ihm eine `max-width`-Eigenschaft von `37.25rem`, eine `margin`-Eigenschaft von `0 auto` und eine `padding`-Eigenschaft von `1.5rem 1.25rem` zu.
Es ist Zeit, die Überschrift deiner Tabelle zu gestalten. Erstelle einen `h1`-Selektor. Weise ihm eine `max-width`-Eigenschaft von `37.25rem`, eine `margin`-Eigenschaft von `0 auto` und eine `padding`-Eigenschaft von `1.5rem 1.25rem` zu.
# --hints--

View File

@@ -7,9 +7,9 @@ dashedName: step-46
# --description--
Bevor du dich mit der Tabelle beschäftigst: Deine `span`-Elemente sind derzeit fett gedruckt. Create a `span:not(.sr-only)` selector and give it a `font-weight` property set to `normal`.
Bevor du dich mit der Tabelle beschäftigst: Deine `span`-Elemente sind derzeit fett gedruckt. Erstelle einen `span:not(.sr-only)`-Selektor und weise ihm eine `font-weight`-Eigenschaft mit dem Wert `normal` zu.
The `:not()` pseudo-selector is used to target all elements that do not match the selector - in this case, any of your `span` elements that do not have the `sr-only` class. This ensures that your earlier rules for the `span[class~="sr-only"]` selector are not overwritten.
Der `:not()`-Pseudo-Selektor wird verwendet, um alle Elemente auszuwählen, die nicht mit dem Selektor übereinstimmen - In diesem Fall all deine `span`-Elemente, die keine `sr-only`-Klasse enthalten. Dies stellt sicher, dass deine vorherigen Regeln für den `span[class~="sr-only"]`-Selektor nicht überschrieben werden.
# --hints--
@@ -19,7 +19,7 @@ Du solltest einen `span:not(.sr-only)`-Selektor haben.
assert(new __helpers.CSSHelp(document).getStyle('span:not(.sr-only)'));
```
Your `span:not(.sr-only)` selector should have a `font-weight` property set to `normal`.
Dein `span:not(.sr-only)`-Selektor sollte eine `font-weight`-Eigenschaft mit dem Wert `normal` enthalten.
```js
assert(new __helpers.CSSHelp(document).getStyle('span:not(.sr-only)')?.getPropertyValue('font-weight') === 'normal');

View File

@@ -7,7 +7,7 @@ dashedName: step-58
# --description--
The `:nth-of-type()` pseudo-selector is used to target specific elements based on their order among siblings of the same type. Use this pseudo-selector to target the third `td` element within your `total` table rows. Give it a right padding of `0.5rem`.
The `:nth-of-type()` pseudo-selector is used to target specific elements based on their order among siblings of the same type. Verwende diesen Pseudo-Selektor, um das dritte `td`-Element innerhalb deiner `total`-Tabellenzeilen auszuwählen. Weise ihm ein rechtes Padding von `0.5rem` zu.
# --hints--

View File

@@ -7,11 +7,11 @@ dashedName: step-6
# --description--
Remember that a `class` attribute can have multiple values. To separate your white keys from your black keys, you'll add a second `class` value of `black--key`. Add this to your second, third, fifth, sixth, and seventh `.key` elements.
Denke daran, dass ein `class`-Attribut mehrere Werte enthalten kann. Um deine weißen Schlüssel von deinen schwarzen Schlüsseln zu trennen, wirst du einen zweiten `class`-Wert von `black--key` hinzufügen. Füge dies zu deinem zweiten, dritten, fünften, sechsten und siebten `.key`-Element hinzu.
# --hints--
Your second `.key` element should also have a `class` of `black--key`.
Dein zweites `.key`-Element sollte auch eine `class` von `black--key` enthalten.
```js
const key = document.querySelectorAll('.key')?.[1];

View File

@@ -7,7 +7,7 @@ dashedName: step-29
# --description--
Within the `@media` query, add a `.keys` selector and set the `width` to `318px`.
Füge innerhalb der `@media` Query einen `.keys`-Selektor hinzu und setze die `width` auf `318px`.
# --hints--

View File

@@ -7,7 +7,7 @@ dashedName: step-16
# --description--
Add a new `div` element inside of your `.canvas` element.
Füge innerhalb deines `.canvas`-Elements ein neues `div`-Element hinzu.
Weise dem neuen `div` das `class`-Attribut mit einem Wert von `one` zu. Dies wird dein erstes Rechteck sein.
@@ -25,7 +25,7 @@ Du solltest das neue `div`-Element in dein `.canvas`-Element einbetten.
assert(document.querySelector('.canvas').children[0].tagName === 'DIV');
```
Your new `div` should have a `class` attribute with a value `one`.
Dein neues `div` sollte ein `class`-Attribut mit einem Wert von `one` enthalten.
```js
assert(document.querySelector('.canvas').children[0].className.split(' ').includes('one'));

View File

@@ -7,7 +7,7 @@ dashedName: step-35
# --description--
Create a rule that targets both `.one` and `.two` and increase their `blur` effect by 1 pixel.
Erstelle eine Regel, die sowohl `.one` als auch `.two` auswählt und deren `blur`-Effekt um 1 Pixel erhöht.
# --hints--
@@ -18,7 +18,7 @@ const oneTwo = new __helpers.CSSHelp(document).getStyle('.one, .two');
assert(oneTwo);
```
You should set the `filter` property to `blur(1px)`.
Du solltest die `filter`-Eigenschaft auf `blur(1px)` setzen.
```js
const hasFilter = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style.filter === 'blur(1px)');

View File

@@ -7,7 +7,7 @@ dashedName: step-27
# --description--
Create a new `.large` selector and give it a `height` property set to `10px`. Erstelle auch einen `.large, .medium`-Selektor und setze die `background-color`-Eigenschaft auf `black`.
Erstelle einen neuen `.large`-Selektor und weise ihm eine `height`-Eigenschaft mit dem Wert `10px` zu. Erstelle auch einen `.large, .medium`-Selektor und setze die `background-color`-Eigenschaft auf `black`.
# --hints--

View File

@@ -7,24 +7,24 @@ dashedName: step-57
# --description--
Create another `p` element after your last `.divider`, and give it the text `Total Sugars 12g`. Assign that `p` element the `class` values necessary to indent it and remove the bottom border. Then create another `.divider` below your new `p` element.
Erstelle ein weiteres `p`-Element nach deinem letzten `.divider` und weise ihm den Text `Total Sugars 12g` zu. Weise diesem `p`-Element die `class`-Werte zu, die notwendig sind, um es einzurücken, und entferne den unteren Rand. Erstelle dann einen weiteren `.divider` unterhalb deines neuen `p`-Elements.
# --hints--
You should create a new `p` and `div` element at the end of your `.daily-value` element.
Du solltest ein neues `p`- und `div`-Element am Ende deines `.daily-value`-Elements erstellen.
```js
assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p');
assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div');
```
Your new `p` element should have the text `Total Sugars 12g`.
Dein neues `p`-Element sollte den Text `Total Sugars 12g` enthalten.
```js
assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/));
```
Your new `p` element should have the `class` attribute set to `indent no-divider`.
Dein neues `p`-Element sollte das `class`-Attribut auf `indent no-divider` gesetzt haben.
```js
assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent'));

View File

@@ -7,13 +7,13 @@ dashedName: step-60
# --description--
Füge unter deinem `.double-indent`-Element ein neues `p`-Element mit dem Text `Includes 10g Added Sugars 20%` hinzu. Your new `p` element should also be double indented, and have no bottom border. Use a `span` to make the `20%` bold and right aligned.
Füge unter deinem `.double-indent`-Element ein neues `p`-Element mit dem Text `Includes 10g Added Sugars 20%` hinzu. Your new `p` element should also be double indented, and have no bottom border. Verwende ein `span`, um die `20%` fettgedruckt zu machen und rechts auszurichten.
Then create another divider after that `p` element.
Erstelle dann nach diesem `p`-Element einen weiteren Trenner.
# --hints--
You should create a new `p` and `div` element at the end of your `.daily-value` element.
Du solltest ein neues `p`- und `div`-Element am Ende deines `.daily-value`-Elements erstellen.
```js
assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p');
@@ -26,7 +26,7 @@ Your new `p` element should have the text `Includes 10g Added Sugars 20%`.
assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/));
```
Your new `p` element should have the `class` attribute set to `double-indent no-divider`.
Dein neues `p`-Element sollte das `class`-Attribut auf `double-indent no-divider` gesetzt haben.
```js
assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('double-indent'));
@@ -45,7 +45,7 @@ Dein `span`-Element sollte das `class`-Attribut auf `bold` gesetzt haben.
assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.classList?.contains('bold'));
```
Your `span` element should wrap the text `20%`.
Dein `span`-Element sollte den Text `20%` umschließen.
```js
assert(document.querySelector('.daily-value.small-text p:last-of-type span')?.innerText === '20%');

View File

@@ -15,7 +15,7 @@ The HTML and CSS have been provided for you. Feel free to explore the code y
# --hints--
You should use the `const` keyword to declare a variable `calculate`.
Du solltest das `const`-Schlüsselwort verwenden, um eine Variable `calculate` zu deklarieren.
```js
assert.match(code, /const\s*calculate/);

View File

@@ -19,7 +19,7 @@ Deine `getMedian`-Funktion sollte über eine `sorted`-Variable verfügen.
assert.match(getMedian.toString(), /sorted\s*=/);
```
Your `getMedian` function should assign `array.sort()` to the `sorted` variable.
Deine `getMedian`-Funktion sollte der `sorted`-Variable `array.sort()` zuweisen.
```js
assert.match(getMedian.toString(), /sorted\s*=\s*array\.sort\(\s*\);/);

View File

@@ -31,7 +31,7 @@ Deine `sumSquaredDifferences`-Variable sollte die `acc`- und `el`-Parameter in d
assert.match(getVariance.toString(), /sumSquaredDifferences\s*=\s*squaredDifferences\.reduce\(function\s*\(?\s*acc\s*,\s*el\s*\)?/);
```
Your `reduce` callback should return the sum of `acc` and `el`.
Dein `reduce`-Callback sollte die Summe von `acc` und `el` zurückgeben.
```js
console.log(getVariance.toString());

View File

@@ -7,41 +7,41 @@ dashedName: step-2
# --description--
Create four `div` elements within your `#game` element. Give them the following respective `id` values, in order: `stats`, `controls`, `monsterStats`, and `text`.
Erstelle vier `div`-Elemente innerhalb deines `#game`-Elements. Gib ihnen die folgenden respektiven `id`-Werte in Reihenfolge: `stats`, `controls`, `monsterStats` und `text`.
# --hints--
You should create four new `div` elements.
Du solltest vier neue `div`-Elemente erstellen.
```js
assert.equal(document.querySelectorAll('div')?.length, 5);
```
You should give one of the new `div` elements an `id` of `stats`.
Du solltest einem der neuen `div`-Elemente eine `id` von `stats` geben.
```js
assert.exists(document.querySelector('div#stats'));
```
You should give one of the new `div` elements an `id` of `controls`.
Du solltest einem der neuen `div`-Elemente eine `id` von `controls` geben.
```js
assert.exists(document.querySelector('div#controls'));
```
You should give one of the new `div` elements an `id` of `monsterStats`.
Du solltest einem der neuen `div`-Elemente eine `id` von `monsterStats` geben.
```js
assert.exists(document.querySelector('div#monsterStats'));
```
You should give one of the new `div` elements an `id` of `text`.
Du solltest einem der neuen `div`-Elemente eine `id` von `text` geben.
```js
assert.exists(document.querySelector('div#text'));
```
You should place the new `div` elements in the correct order.
Du solltest die neuen `div`-Elemente in der richtigen Reihenfolge platzieren.
```js
function __t(a, b) {
@@ -50,7 +50,7 @@ function __t(a, b) {
assert(__t('div#stats','controls') && __t('div#controls','monsterStats') && __t('div#monsterStats','text'));
```
You should place the new `div` elements within the `#game` element.
Du solltest die neuen `div`-Elemente innerhalb des `#game`-Elements platzieren.
```js
assert.equal(document.querySelector('#game')?.children?.length, 4);

View File

@@ -1,42 +1,42 @@
---
id: 62a1166ed9a56d439c0770e7
title: Step 3
title: Schritt 3
challengeType: 0
dashedName: step-3
---
# --description--
Create three `span` elements within your `#stats` element. Give each of them the class `stat`. Then give the first one the text `XP: 0`, the second one the text `Health: 100`, and the third one the text `Gold: 50`.
Erstelle drei `span`-Elemente innerhalb deines `#stats`-Elements. Gib jedem von ihnen die Klasse `stat`. Gib dann dem ersten den Text `XP: 0`, dem zweiten den Text `Health: 100` und dem dritten den Text `Gold: 50`.
# --hints--
You should have three `span` elements within the `#stats` element.
Du solltest drei `span`-Elemente innerhalb des `#stats`-Elements haben.
```js
const spans = document.querySelectorAll('#stats > span');
assert.equal(spans?.length, 3);
```
You should give the new three `span` elements a class of `stat`.
Du solltest den drei neuen `span`-Elementen eine Klasse von `stat` geben.
```js
assert.exists(document.querySelectorAll('#stats > .stat')?.length, 3);
```
Your first `.stat` element should have the provided text `XP: 0`.
Dein erstes `.stat`-Element sollte den bereitgestellten Text `XP: 0` haben.
```js
assert(document.querySelectorAll('#stats > .stat')?.[0]?.innerText === 'XP: 0');
```
Your second `.stat` element should have the provided text `Health: 100`.
Dein neues `.stat`-Element sollte den bereitgestellten Text `Health: 100` haben.
```js
assert(document.querySelectorAll('#stats > .stat')?.[1]?.innerText === 'Health: 100');
```
Your third `.stat` element should have the provided text `Gold: 50`.
Dein drittes `.stat`-Element sollte den bereitgestellten Text `Gold: 50` haben.
```js
assert(document.querySelectorAll('#stats > .stat')?.[2]?.innerText === 'Gold: 50');

View File

@@ -1,6 +1,6 @@
---
id: 62a23c1d505bfa13747c8a9b
title: Step 4
title: Schritt 4
challengeType: 0
dashedName: step-4
---
@@ -11,7 +11,7 @@ Wrap the numbers `0`, `100`, and `50` in `span` elements, and wrap those new `sp
# --hints--
You should add a `strong` element in your first `.stat` element.
Du solltest ein `strong`-Element in dein erstes `.stat`-Element hinzufügen.
```js
const stat = document.querySelectorAll('.stat')[0];
@@ -19,7 +19,7 @@ const strong = stat?.querySelector('strong');
assert.exists(strong);
```
Your first new `strong` element should have a `span` element.
Dein erstes neues `strong`-Element sollte ein `span`-Element haben.
```js
const stat = document.querySelectorAll('.stat')[0];
@@ -53,7 +53,7 @@ const stat = document.querySelectorAll('.stat')[0];
assert.equal(stat.innerText, 'XP: 0');
```
You should add a `strong` element in your second `.stat` element.
Du solltest ein `strong`-Element in deinem zweiten `.stat`-Element hinzufügen.
```js
const stat = document.querySelectorAll('.stat')[1];
@@ -61,7 +61,7 @@ const strong = stat?.querySelector('strong');
assert.exists(strong);
```
Your second new `strong` element should have a `span` element.
Dein zweites neues `strong`-Element sollte ein `span`-Element haben.
```js
const stat = document.querySelectorAll('.stat')[1];
@@ -103,7 +103,7 @@ const strong = stat?.querySelector('strong');
assert.exists(strong);
```
Your third new `strong` element should have a `span` element.
Dein neues drittes `strong`-Element sollte ein `span`-Element haben.
```js
const stat = document.querySelectorAll('.stat')[2];

View File

@@ -1,13 +1,13 @@
---
id: 62a23cb9bc467a147516b500
title: Step 5
title: Schritt 5
challengeType: 0
dashedName: step-5
---
# --description--
For your `#controls` element, create three `button` elements. The first should have the `id` set to `button1`, and the text `Go to store`. The second should have the `id` set to `button2`, and the text `Go to cave`. The third should have the `id` set to `button3`, and the text `Fight dragon`.
For your `#controls` element, create three `button` elements. Das erste sollte die `id` auf `button1` gesetzt haben und den Text `Go to store` enthalten. Das zweite sollte die `id` auf `button2` gesetzt haben und den Text `Go to cave` enthalten. Das dritte sollte die `id` auf `button3` gesetzt haben und den Text `Fight dragon` enthalten.
# --hints--
@@ -19,7 +19,7 @@ assert.exists(buttons);
assert.equal(buttons.length, 3);
```
Your first button should have the `id` set to `button1`.
Deine erste Schaltfläche sollte die `id` auf `button1` gesetzt haben.
```js
const buttons = document.querySelectorAll('#controls > button');
@@ -27,7 +27,7 @@ const button1 = buttons[0];
assert.equal(button1.id, 'button1');
```
Your first button should have the text `Go to store`.
Deine erste Schaltfläche sollte den Text `Go to store` haben.
```js
const buttons = document.querySelectorAll('#controls > button');
@@ -35,7 +35,7 @@ const button1 = buttons[0];
assert.equal(button1.innerText, 'Go to store');
```
Your second button should have the `id` set to `button2`.
Deine zweite Schaltfläche sollte die `id` auf `button2` gesetzt haben.
```js
const buttons = document.querySelectorAll('#controls > button');
@@ -43,7 +43,7 @@ const button2 = buttons[1];
assert.equal(button2.id, 'button2');
```
Your second button should have the text `Go to cave`.
Deine zweite Schaltfläche sollte den Text `Go to cave` haben.
```js
const buttons = document.querySelectorAll('#controls > button');
@@ -51,7 +51,7 @@ const button2 = buttons[1];
assert.equal(button2.innerText, 'Go to cave');
```
Your third button should have the `id` set to `button3`.
Deine dritte Schaltfläche sollte die `id` auf `button3` gesetzt haben.
```js
const buttons = document.querySelectorAll('#controls > button');
@@ -59,7 +59,7 @@ const button3 = buttons[2];
assert.equal(button3.id, 'button3');
```
Your third button should have the text `Fight dragon`.
Deine dritte Schaltfläche sollte den Text `Fight dragon` haben.
```js
const buttons = document.querySelectorAll('#controls > button');

View File

@@ -1,17 +1,17 @@
---
id: 62a23d1c5f1c93161f3582ae
title: Step 6
title: Schritt 6
challengeType: 0
dashedName: step-6
---
# --description--
Similar to your `#stats` element, your `#monsterStats` element needs two `span` elements. Give them the class `stat` and give the first element the text `Monster Name:` and the second the text `Health:`. After the text in each, add a `strong` element with an empty nested `span` element.
Similar to your `#stats` element, your `#monsterStats` element needs two `span` elements. Gib ihnen die Klasse `stat` und gib dem ersten Element den Text `Monster Name:` und dem zweiten den Text `Health:`. After the text in each, add a `strong` element with an empty nested `span` element.
# --hints--
Your `#monsterStats` element should have two `span` elements.
Dein `#monsterStats`-Element sollte zwei `span`-Elemente haben.
```js
const spans = document.querySelectorAll(`#monsterStats > span`);
@@ -26,14 +26,14 @@ assert.equal(spans[0].className, 'stat');
assert.equal(spans[1].className, 'stat');
```
Your first `span` element should have the text `Monster Name:`. Make sure the spacing is correct.
Your first `span` element should have the text `Monster Name:`. Achte darauf, dass die Abstände korrekt sind.
```js
const spans = document.querySelectorAll(`#monsterStats > span`);
assert.equal(spans[0].innerText, 'Monster Name: ');
```
Your second `span` element should have the text `Health:`. Make sure the spacing is correct.
Your second `span` element should have the text `Health:`. Achte darauf, dass die Abstände korrekt sind.
```js
const spans = document.querySelectorAll(`#monsterStats > span`);

View File

@@ -7,7 +7,7 @@ dashedName: step-7
# --description--
Give your `#text` element the following text:
Gib deinem `#text`-Element den folgenden Text:
```markup
Welcome to Dragon Repeller. You must defeat the dragon that is preventing people from leaving the town.
@@ -16,7 +16,7 @@ You are in the town square. Where do you want to go? Use the buttons above.
# --hints--
Your `#text` element should have the above quoted text.
Dein `#text`-Element sollte den oben zitiereten Text enthalten.
```js
const text = document.querySelector('#text');

View File

@@ -7,7 +7,7 @@ dashedName: step-8
# --description--
Now we need some quick styling. Start by giving the `body` a `background-color` set to `darkblue`.
Now we need some quick styling. Beginne indem du dem `body` eine `background-color` von `darkblue` gibst.
# --hints--

View File

@@ -1,6 +1,6 @@
---
id: 62a2409897ec621942234cf6
title: Step 9
title: Schritt 9
challengeType: 0
dashedName: step-9
---

View File

@@ -7,7 +7,7 @@ dashedName: step-10
# --description--
Give your `#game` a maximum width of `500px` and a maximum height of `400px`. Set the `background-color` to `lightgray` and the `color` to `white`. Use margins to center it by setting the top and bottom margin to `0`, and the left and right margin to `auto`. Finally, give it `10px` of padding on all four sides.
Gib deinem `#game` eine maximale Breite von `500px` und eine maximale Höhe von `400px`. Setze die `background-color` auf `lightgray` und die `color` auf `white`. Nutze Margins, um das Ganze zu zentrieren, indem die obere und untere Margin auf `0` gesetzt wird und die linke und rechte Margin auf `auto`. Füge zum Schluss jeweils `10px` als Padding bei allen vier Seiten hinzu.
# --hints--

View File

@@ -1,38 +1,38 @@
---
id: 62a24128d5e8af1b47ad1aab
title: Step 11
title: Schritt 11
challengeType: 0
dashedName: step-11
---
# --description--
Give both your `#controls` and `#stats` elements a `border` of `1px solid black`, a `black` text color, and `5px` of padding.
Gib deinen beiden `#controls` and `#stats`-Elementen einen `border` von `1px solid black`, eine `black` Textfarbe und `5px` Padding.
# --hints--
You should have a `#controls, #stats` selector.
Du solltest einen `#controls, #stats`-Selektor haben.
```js
const selector = new __helpers.CSSHelp(document).getStyle('#controls, #stats');
assert.exists(selector);
```
Your `#controls, #stats` selector should have a `border` of `1px solid black`.
Dein `#controls, #stats`-Selektor sollte einen `border` von `1px solid black` haben.
```js
const border = new __helpers.CSSHelp(document).getStyle('#controls, #stats')?.getPropertyValue('border');
assert.equal(border, '1px solid black');
```
Your `#controls, #stats` selector should have a `color` of `black`.
Dein `#controls, #stats`-Selektor sollte eine `color` von `black` haben.
```js
const color = new __helpers.CSSHelp(document).getStyle('#controls, #stats')?.getPropertyValue('color');
assert.equal(color, 'black');
```
Your `#controls, #stats` selector should have `5px` of padding.
Dein `#controls, #stats`-Selektor sollte `5px`-Padding haben.
```js
const padding = new __helpers.CSSHelp(document).getStyle('#controls, #stats')?.getPropertyValue('padding');

View File

@@ -1,17 +1,17 @@
---
id: 62a24190868ca51c0b6e83c7
title: Step 13
title: Schritt 13
challengeType: 0
dashedName: step-13
---
# --description--
Verstecke vorerst dein `#monsterStats`-Element mit der `display`-Eigenschaft. Do not change any of the other styling.
Verstecke vorerst dein `#monsterStats`-Element mit der `display`-Eigenschaft. Ändere nichts an der übrigen Gestaltung.
# --hints--
You should have a `#monsterStats` selector.
Du solltest einen `#monsterStats`-Selektor haben.
```js
const monsterStats = new __helpers.CSSHelp(document).getStyle('#monsterStats');
@@ -32,21 +32,21 @@ const border = new __helpers.CSSHelp(document).getStyle('#monsterStats')?.getPro
assert.equal(border, '1px solid black');
```
Your `#monsterStats` selector should have `5px` of padding.
Dein `#monsterStats`-Selektor sollte `5px`-Padding haben.
```js
const padding = new __helpers.CSSHelp(document).getStyle('#monsterStats')?.getPropertyValue('padding');
assert.equal(padding, '5px');
```
Your `#monsterStats` selector should have a `color` of `white`.
Dein `#monsterStats`-Selektor sollte eine `color` in `white` haben.
```js
const color = new __helpers.CSSHelp(document).getStyle('#monsterStats')?.getPropertyValue('color');
assert.equal(color, 'white');
```
Your `#monsterStats` selector should have a `background-color` of `red`.
Dein `#monsterStats`-Selektor sollte eine `background-color` in `red` haben.
```js
const background = new __helpers.CSSHelp(document).getStyle('#monsterStats')?.getPropertyValue('background-color');

View File

@@ -1,6 +1,6 @@
---
id: 62a241df03c1f61ce936f5d9
title: Step 14
title: Schritt 14
challengeType: 0
dashedName: step-14
---
@@ -11,7 +11,7 @@ Finally, give your `.stat` elements a `padding-right` of `10px`.
# --hints--
You should have a `.stat` selector.
Du solltest einen `.stat`-Selektor haben.
```js
const stat = new __helpers.CSSHelp(document).getStyle('.stat');

View File

@@ -1,29 +1,29 @@
---
id: 62a2509ba163e020bb9d84ea
title: Step 15
title: Schritt 15
challengeType: 0
dashedName: step-15
---
# --description--
Now you can start writing your JavaScript. Begin by creating a `script` element. This element is used to load JavaScript into your HTML file. You should use an opening `<script>` and closing `</script>` tag.
Nun kannst du beginnen, dein JavaScript zu schreiben. Beginne, indem du ein `script`-Element erstellst. Dieses Element wird verwendet, um JavaScript in deine HTML-Datei zu laden. Du solltest ein öffnendes `<script>` und schließendes `</script>` Tag verwenden.
# --hints--
You should have a `script` element.
Du solltest ein `script`-Element haben.
```js
assert.isAtLeast(document.querySelectorAll('script').length, 2);
```
Your `script` element should have an opening tag.
Dein `script`-Element sollte ein öffnendes Tag haben.
```js
assert.match(code, /<script\s*>/i);
```
Your `script` element should have a closing tag.
Dein `script`-Element sollte ein schließendes Tag haben.
```js
assert.match(code, /<\/script\s*>/i);

View File

@@ -1,29 +1,29 @@
---
id: 62a255dae245b52317da824a
title: Step 16
title: Schritt 16
challengeType: 0
dashedName: step-16
---
# --description--
One of the most powerful tools is your developer console. Depending on your browser, this might be opened by pressing `F12` or `Ctrl+Shift+I`. Auf dem Mac kannst du `Option + ⌘ + C` drücken und "Konsole" auswählen. You can also click the "Console" button above the preview window to see our built-in console.
Eines der leistungsfähigsten Werkzeuge ist deine Entwicklerkonsole. Abhängig von deinem Browser kann dies durch Drücken von `F12` oder `Ctrl+Shift+I` geöffnet werden. Auf dem Mac kannst du `Option + ⌘ + C` drücken und "Konsole" auswählen. Du kannst auch auf die Schaltfläche "Konsole" oberhalb des Vorschaufensters klicken, um unsere integrierte Konsole zu sehen.
The developer console will include errors that are produced by your code, but you can also use it to see values of variables in your code, which is helpful for debugging.
Die Entwicklerkonsole enthält Fehler, die durch deinen Code verursacht werden, aber du kannst sie auch verwenden, um die Werte von Variablen in deinem Code zu sehen, was bei der Fehlersuche hilfreich ist.
Add a `console.log("Hello World");` line between your `script` tags. Then click the "Console" button to open the console. You should see the text `Hello World`.
Füge eine `console.log("Hello World");`-Zeile zwischen deinen `script`-Tags hinzu. Klicke dann auf die "Konsole"-Schaltfläche, um die Konsole zu öffnen. Du solltest den Text `Hello World` sehen.
Note how the line ends with a semi-colon. It is common practice in JavaScript to end your code lines with semi-colons.
Beachte, dass die Zeile mit einem Semikolon endet. In JavaScript ist es üblich, Codezeilen mit Semikolons zu beenden.
# --hints--
You should add a `console.log("Hello World");` line to your code. Don't forget the semi-colon.
You should add a `console.log("Hello World");` line to your code. Vergesse das Semikolon nicht.
```js
assert.match(code, /console\.log\("Hello World"\);/);
```
Your `console.log("Hello World");` line should be between your `script` tags.
Deine `console.log("Hello World");` Zeile sollte sich zwischen deinen `script` Tags befinden.
```js
assert.match(code, /<script>\s*console\.log\("Hello World"\);\s*<\/script>/);

View File

@@ -1,15 +1,15 @@
---
id: 62a257659d0d1e2456f24ba2
title: Step 17
title: Schritt 17
challengeType: 0
dashedName: step-17
---
# --description--
Before you start writing your project code, you should move it to its own file to keep things organized.
Bevor du mit dem Schreiben deines Projektcodes beginnst, solltest du ihn in seine eigene Datei verschieben, um Ordnung zu halten.
Remove your `console.log("Hello World");` line. Gib dann deinem nun leeren `script`-Element ein `src`-Attribut mit dem Wert `./script.js`.
Entferne deine `console.log("Hello World");`-Zeile. Gib dann deinem nun leeren `script`-Element ein `src`-Attribut mit dem Wert `./script.js`.
# --hints--

View File

@@ -1,13 +1,13 @@
---
id: 62a39f5a5790eb27c1e5d4bf
title: Step 18
title: Schritt 18
challengeType: 0
dashedName: step-18
---
# --description--
Your view has been switched to your new `script.js` file. Remember that you can use the tabs above to switch between files.
Deine Ansicht wurde auf deine neue `script.js` Datei umgestellt. Denke daran, dass du die oben genannten Registerkarten verwenden kannst, um zwischen den Dateien wechseln zu können.
Add your `console.log("Hello World");` line to this file, and see it appear in your console.

View File

@@ -29,7 +29,7 @@ Du solltest die `onclick`-Eigenschaften von `button2` auf die Variable `goCave`
assert.match(code, /button2\.onclick\s*=\s*goCave/);
```
You should use dot notation to access the `onclick` property of `button3`.
Du solltest die Punktnotation verwenden, um auf die `onclick`-Eigenschaft von `button3` zuzugreifen.
```js
assert.match(code, /button3\.onclick/);

View File

@@ -35,7 +35,7 @@ Du solltest die `innerText`-Eigenschaft innerhalb deiner `goStore`-Funktion aktu
assert.match(goStore.toString(), /button2\.innerText\s*=\s*('|")Buy weapon \(30 gold\)\1/);
```
You should use dot notation to access the `innerText` property of `button3`.
Du solltest die Punktnotation verwenden, um auf die `innerText`-Eigenschaft von `button3` zuzugreifen.
```js
assert.match(code, /button3\.innerText/);
@@ -47,7 +47,7 @@ You should not use `let` or `const` to access the `innerText` property of `butto
assert.notMatch(code, /(let|const)\s+button3.innerText/);
```
You should update the `innerText` property of `button3` to be `Go to town square`.
Du solltest die `innerText`-Eigenschaft von `button3` so aktualisieren, dass sie `Go to town square` ergibt.
```js
assert.match(code, /button3\.innerText\s*=\s*('|")Go to town square\1/);

View File

@@ -37,7 +37,7 @@ The second value in the `button text` array should be "Go to cave".
assert.equal(locations[0]["button text"][1], "Go to cave");
```
The third value in the `button text` array should be "Fight dragon".
Der dritte Wert im `button text`-Array sollte "Fight dragon" sein.
```js
assert.equal(locations[0]["button text"][2], "Fight dragon");

View File

@@ -7,7 +7,7 @@ dashedName: step-104
# --description--
Die `shift()`-Methode auf einem Array entfernt das erste Element im Array und gibt es zurück. Use this method to take the first element from the `inventory` array and assign it to your `currentWeapon` variable.
Die `shift()`-Methode auf einem Array entfernt das erste Element im Array und gibt es zurück. Verwende diese Methode, um das erste Element aus dem `inventory`-Array zu nehmen und es deiner `currentWeapon`-Variable zuzuweisen.
# --hints--

View File

@@ -1,15 +1,15 @@
---
id: 62a8f06fb318666fef69f91e
title: Step 133
title: Schritt 133
challengeType: 0
dashedName: step-133
---
# --description--
The word `Arg!` should have quotes around it. Besides escaping quotes, there is another way you can include quotation marks inside a string.
Das Wort `Arg!` sollte in Anführungszeichen gesetzt werden. Besides escaping quotes, there is another way you can include quotation marks inside a string.
Change the double quotes around the string `The monster screams Arg! as it dies. You gain experience points and find gold.` to single quotes `'`, then add double quotes around `Arg!`.
Wandle die doppelten Anführungszeichen um den String `The monster screams Arg! as it dies. You gain experience points and find gold.` in einfache Anführungszeichen `'` um und füge dann doppelte Anführungszeichen um `Arg!` herum hinzu.
# --hints--

View File

@@ -1,15 +1,15 @@
---
id: 62a8f14fe6d1fc72454648c7
title: Step 134
title: Schritt 134
challengeType: 0
dashedName: step-134
---
# --description--
After a monster is defeated, the monster's stat box should no longer display.
Nachdem ein Monster besiegt wurde, sollte die Box mit den Werten des Monsters nicht mehr angezeigt werden.
On the first line of the `update` function, use `monsterStats.style.display` to change the `display` value to `none`.
Verwende in der ersten Zeile der `update`-Funktion `monsterStats.style.display`, um den `display`-Wert zu `none` zu verändern.
# --hints--

View File

@@ -1,6 +1,6 @@
---
id: 62a8f20463b324759953edad
title: Step 136
title: Schritt 136
challengeType: 0
dashedName: step-136
---

View File

@@ -1,15 +1,15 @@
---
id: 62a8f256b813a476cae51f49
title: Step 138
title: Schritt 138
challengeType: 0
dashedName: step-138
---
# --description--
Back to your `attack` function - inside the `else if` block, create another `if` and `else` statement. If the player is fighting the dragon (`fighting` would be `2`), call the `winGame` function. Move the `defeatMonster()` call to the `else` block.
Back to your `attack` function - inside the `else if` block, create another `if` and `else` statement. Wenn der Spieler gegen den Drachen kämpft (`fighting` would be `2`), rufe die Funktion `winGame` auf. Move the `defeatMonster()` call to the `else` block.
Here is an example that checks if `num` is equal to `5`:
Hier ist ein Beispiel, das prüft, ob `num` gleich `5` ist:
```js
if (num === 5) {
@@ -28,7 +28,7 @@ const block = attack.toString().split("else if");
assert.include(block[1], "if");
```
Your new `if` statement should check if `fighting` is strictly equal to `2`.
Deine neue `if`-Anweisung sollte prüfen, ob `fighting` genau `2` entspricht.
```js
const block = attack.toString().split("else if");

View File

@@ -1,17 +1,17 @@
---
id: 62a8f35bde1750791f58773f
title: Step 140
title: Schritt 140
challengeType: 0
dashedName: step-140
---
# --description--
After the `lose` function, create a function called `winGame`. Inside the `winGame` function, call the `update` function and pass in `locations[6]`.
After the `lose` function, create a function called `winGame`. Rufe in der `winGame` Funktion die `update` Funktion auf und reiche `locations[6]` ein.
# --hints--
You should use the `function` keyword to declare `winGame`.
Du solltest mit dem `function`-Schlüsselwort `winGame` deklarieren.
```js
assert.match(code, /function\s+winGame/);

View File

@@ -1,29 +1,29 @@
---
id: 62a94114ce0b8918b487390f
title: Step 141
title: Schritt 141
challengeType: 0
dashedName: step-141
---
# --description--
Add another object in the `locations` array. Everything should be the same as the `lose` object, except the `name` should be `win` and the `text` should be `You defeat the dragon! YOU WIN THE GAME! 🎉`.
Add another object in the `locations` array. Alles sollte wie beim `lose`-Objekt sein, außer der `name` sollte `win` und der `text` sollte `You defeat the dragon! YOU WIN THE GAME! 🎉` sein.
# --hints--
You should have seven values in the `locations` array.
Du solltest sieben Werte in der `locations`-Anordnung haben.
```js
assert.lengthOf(locations, 7);
```
Your seventh `locations` value should be an object.
Dein siebter `locations`-Wert sollte ein Objekt sein.
```js
assert.isObject(locations[6]);
```
Your seventh `locations` value should have a `name` property with the value `win`.
Dein siebter `locations`-Wert sollte eine `name`-Eigenschaft mit dem Wert `win` haben.
```js
assert.equal(locations[6].name, 'win');
@@ -35,13 +35,13 @@ Your seventh `locations` value should have a `button text` array with three `REP
assert.deepEqual(locations[6]["button text"], ['REPLAY?', 'REPLAY?', 'REPLAY?']);
```
Your seventh `locations` value should have a `button functions` array with three `restart` variables.
Dein siebter `locations`-Wert sollte ein `button functions`-Array mit drei `restart`-Variablen haben.
```js
assert.deepEqual(locations[6]["button functions"], [restart, restart, restart]);
```
Your seventh `locations` value should have a `text` property with the value `You defeat the dragon! YOU WIN THE GAME! 🎉`.
Dein siebter `locations`-Wert sollte eine `text`-Eigenschaft mit dem Wert `You defeat the dragon! YOU WIN THE GAME! 🎉` haben.
```js
assert.equal(locations[6].text, 'You defeat the dragon! YOU WIN THE GAME! 🎉');

View File

@@ -7,7 +7,7 @@ dashedName: step-142
# --description--
Your game could be complete now, but you can also make it more interesting.
Dein Spiel könnte jetzt komplett sein, aber du könntest es auch interessanter machen.
Inside your `attack` function, change your `health -= monsters[fighting].level;` line to `health -= getMonsterAttackValue(monsters[fighting].level);`. This sets `health` equal to `health` minus the return value of the `getMonsterAttackValue` function, and passes the `level` of the monster as an argument.

View File

@@ -1,13 +1,13 @@
---
id: 62aa1d6736ba262cfa74344b
title: Step 143
title: Schritt 143
challengeType: 0
dashedName: step-143
---
# --description--
Below your `attack` function, create an empty function named `getMonsterAttackValue`. It should take `level` as a parameter.
Below your `attack` function, create an empty function named `getMonsterAttackValue`. Es sollte `level` als Parameter nehmen.
# --hints--
@@ -17,7 +17,7 @@ You should use the `function` keyword to declare `getMonsterAttackValue`.
assert.match(code, /function\s+getMonsterAttackValue/);
```
Your `getMonsterAttackValue` should take `level` as a parameter.
Dein `getMonsterAttackValue` sollte `level` als Parameter nehmen.
```js
assert.match(code, /getMonsterAttackValue\(\s*level\s*\)/);

View File

@@ -1,31 +1,31 @@
---
id: 62aa1d9f535e102e4663e7a6
title: Step 144
title: Schritt 144
challengeType: 0
dashedName: step-144
---
# --description--
The attack of the monster will be based on the monster's `level` and the player's `xp`. In the `getMonsterAttackValue` function, use `const` to create a variable called `hit`. Assign it the equation `(level * 5) - (Math.floor(Math.random() * xp));`.
Der Angriff des Monsters basiert auf das `level` des Monsters und auf dem `xp` des Spielers. In the `getMonsterAttackValue` function, use `const` to create a variable called `hit`. Weise ihm die Gleichung `(level * 5) - (Math.floor(Math.random() * xp));` zu.
This will set the monster's attack to five times their `level` minus a random number between 0 and the player's `xp`.
Dadurch wird der Angriff des Monsters auf das Fünffache seines `level` minus einer zufälligen Zahl zwischen 0 und dem des Spielers `xp` gesetzt.
# --hints--
You should use `const` to declare the variable `hit`.
Du solltest `const` verwenden, um die Variable `hit` zu deklarieren.
```js
assert.match(code, /const\s*hit/);
```
You should use the equation `(level * 5) - (Math.floor(Math.random() * xp))`.
Du solltest die Gleichung `(level * 5) - (Math.floor(Math.random() * xp))` verwenden.
```js
assert.match(getMonsterAttackValue, /(level\s*\*\s*5)\s*-\s*(Math.floor\(Math.random\(\)\s*\*\s*xp\))/);
```
You should set `hit` to the value of `(level * 5) - (Math.floor(Math.random() * xp))`.
Du solltest `hit` auf den Wert von `(level * 5) - (Math.floor(Math.random() * xp))` einstellen.
```js
assert.match(code, /hit\s*=\s*\(level\s*\*\s*5\)\s*-\s*\(Math.floor\(Math.random\(\)\s*\*\s*xp\)\)/);

View File

@@ -41,22 +41,22 @@ Find the maximum total from top to bottom of the triangle below:
# --hints--
`maximumPathSumI(testTriangle)` should return a number.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumI(testTriangle) === 'number');
assert(typeof maximumPathSumI(_testTriangle) === 'number');
```
`maximumPathSumI(testTriangle)` should return 23.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumI(testTriangle), 23);
assert.strictEqual(maximumPathSumI(_testTriangle), 23);
```
`maximumPathSumI(numTriangle)` should return 1074.
`maximumPathSumI([[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]])` should return 1074.
```js
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
assert.strictEqual(maximumPathSumI(_numTriangle), 1074);
```
# --seed--
@@ -64,7 +64,9 @@ assert.strictEqual(maximumPathSumI(numTriangle), 1074);
## --before-user-code--
```js
const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _testTriangle = [[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]];
```
## --seed-contents--
@@ -74,13 +76,6 @@ function maximumPathSumI(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumI(testTriangle);
```
# --solutions--

View File

@@ -25,13 +25,13 @@ Find the maximum total from top to bottom in `numTriangle`, a 2D array defined i
# --hints--
`maximumPathSumII(testTriangle)` should return a number.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumII(_testTriangle) === 'number');
```
`maximumPathSumII(testTriangle)` should return 23.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumII(_testTriangle), 23);
@@ -62,13 +62,6 @@ function maximumPathSumII(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumII(testTriangle);
```
# --solutions--

View File

@@ -8,7 +8,7 @@ dashedName: moving-forward-from-here
# --description--
Congratulazioni! Hai finito le lezioni su React e Redux. C'è un ultima cosa che vale la pena di sottolineare prima di andare avanti. In genere, non scriverai le applicazioni React in un editor di codice come questo. This challenge gives you a glimpse of what the syntax looks like if you're working with a file system on your own machine. Il codice dovrebbe apparire simile, tranne per l'uso delle istruzioni `import` (queste importano tutte le dipendenze che ti sono sono state fornite nelle sfide).
Congratulazioni! Hai finito le lezioni su React e Redux. C'è un ultima cosa che vale la pena di sottolineare prima di andare avanti. In genere, non scriverai le applicazioni React in un editor di codice come questo. Questa sfida ti dà un assaggio di come appare la sintassi se stai lavorando con un file system sulla tua macchina. Il codice dovrebbe apparire simile, tranne per l'uso delle istruzioni `import` (queste importano tutte le dipendenze che ti sono sono state fornite nelle sfide).
Infine, scrivere codice React e Redux richiede generalmente una certa configurazione. Questo può diventare rapidamente complicato. Se sei interessato a sperimentare sulla tua macchina, la <a href="https://www.freecodecamp.org/news/install-react-with-create-react-app/" target="_blank" rel="noopener noreferrer nofollow">Create React App</a> è configurata ed è pronta all'uso.

View File

@@ -41,22 +41,22 @@ Trova il totale massimo dall'alto al basso del triangolo qui sotto:
# --hints--
`maximumPathSumI(testTriangle)` dovrebbe restituire un numero.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumI(testTriangle) === 'number');
assert(typeof maximumPathSumI(_testTriangle) === 'number');
```
`maximumPathSumI(testTriangle)` dovrebbe restituire 23.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumI(testTriangle), 23);
assert.strictEqual(maximumPathSumI(_testTriangle), 23);
```
`maximumPathSumI(numTriangle)` dovrebbe restituire 1074.
`maximumPathSumI([[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]])` should return 1074.
```js
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
assert.strictEqual(maximumPathSumI(_numTriangle), 1074);
```
# --seed--
@@ -64,7 +64,9 @@ assert.strictEqual(maximumPathSumI(numTriangle), 1074);
## --before-user-code--
```js
const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _testTriangle = [[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]];
```
## --seed-contents--
@@ -74,13 +76,6 @@ function maximumPathSumI(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumI(testTriangle);
```
# --solutions--

View File

@@ -25,13 +25,13 @@ Trova il totale massimo da cima a fondo in `numTriangle`, un array 2D definito d
# --hints--
`maximumPathSumII(testTriangle)` dovrebbe restituire un numero.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumII(_testTriangle) === 'number');
```
`maximumPathSumII(testTriangle)` dovrebbe restituire 23.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumII(_testTriangle), 23);
@@ -62,13 +62,6 @@ function maximumPathSumII(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumII(testTriangle);
```
# --solutions--

View File

@@ -41,22 +41,22 @@ Find the maximum total from top to bottom of the triangle below:
# --hints--
`maximumPathSumI(testTriangle)` should return a number.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumI(testTriangle) === 'number');
assert(typeof maximumPathSumI(_testTriangle) === 'number');
```
`maximumPathSumI(testTriangle)` should return 23.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumI(testTriangle), 23);
assert.strictEqual(maximumPathSumI(_testTriangle), 23);
```
`maximumPathSumI(numTriangle)` should return 1074.
`maximumPathSumI([[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]])` should return 1074.
```js
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
assert.strictEqual(maximumPathSumI(_numTriangle), 1074);
```
# --seed--
@@ -64,7 +64,9 @@ assert.strictEqual(maximumPathSumI(numTriangle), 1074);
## --before-user-code--
```js
const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _testTriangle = [[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]];
```
## --seed-contents--
@@ -74,13 +76,6 @@ function maximumPathSumI(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumI(testTriangle);
```
# --solutions--

View File

@@ -25,13 +25,13 @@ Find the maximum total from top to bottom in `numTriangle`, a 2D array defined i
# --hints--
`maximumPathSumII(testTriangle)` should return a number.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumII(_testTriangle) === 'number');
```
`maximumPathSumII(testTriangle)` should return 23.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumII(_testTriangle), 23);
@@ -62,13 +62,6 @@ function maximumPathSumII(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumII(testTriangle);
```
# --solutions--

View File

@@ -8,7 +8,7 @@ dashedName: moving-forward-from-here
# --description--
Parabéns! Você concluiu as lições sobre React e Redux. Vale a pena destacar um último item antes de continuar. Normalmente, você não escreverá apps React em um editor de código como esse. This challenge gives you a glimpse of what the syntax looks like if you're working with a file system on your own machine. O código deve ser similar, exceto para o uso de instruções de `import` (essas puxam em todas as dependências fornecidas para você nos desafios).
Parabéns! Você concluiu as lições sobre React e Redux. Vale a pena destacar um último item antes de continuar. Normalmente, você não escreverá apps React em um editor de código como esse. Esse desafio dá a você uma ideia de como a sintaxe se parece se você está trabalhando com um sistema de arquivos na sua própria máquina. O código deve ser similar, exceto para o uso de instruções de `import` (essas puxam em todas as dependências fornecidas para você nos desafios).
Finalmente, escrever código React e Redux geralmente requer alguma configuração. Isto pode tornar-se complicado rapidamente. Se você estiver interessado em experimentar em sua própria máquina, o <a href="https://www.freecodecamp.org/news/install-react-with-create-react-app/" target="_blank" rel="noopener noreferrer nofollow">Create React App</a> vem configurado e pronto para ser usado.

View File

@@ -41,22 +41,22 @@ Calcule o máximo total do topo até o final do triângulo abaixo:
# --hints--
`maximumPathSumI(testTriangle)` deve retornar um número.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` deve retornar um número.
```js
assert(typeof maximumPathSumI(testTriangle) === 'number');
assert(typeof maximumPathSumI(_testTriangle) === 'number');
```
`maximumPathSumI(testTriangle)` deve retornar 23.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` deve retornar 23.
```js
assert.strictEqual(maximumPathSumI(testTriangle), 23);
assert.strictEqual(maximumPathSumI(_testTriangle), 23);
```
`maximumPathSumI(numTriangle)` deve retornar 1074.
`maximumPathSumI([[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]])`deve retornar 1074.
```js
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
assert.strictEqual(maximumPathSumI(_numTriangle), 1074);
```
# --seed--
@@ -64,7 +64,9 @@ assert.strictEqual(maximumPathSumI(numTriangle), 1074);
## --before-user-code--
```js
const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _testTriangle = [[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]];
```
## --seed-contents--
@@ -74,13 +76,6 @@ function maximumPathSumI(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumI(testTriangle);
```
# --solutions--

View File

@@ -25,13 +25,13 @@ Calcule o total máximo de cima para baixo em `numTriangle`, um array 2D definid
# --hints--
`maximumPathSumII(testTriangle)` deve retornar um número.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` deve retornar um número.
```js
assert(typeof maximumPathSumII(_testTriangle) === 'number');
```
`maximumPathSumII(testTriangle)` deve retornar 23.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` deve retornar 23.
```js
assert.strictEqual(maximumPathSumII(_testTriangle), 23);
@@ -62,13 +62,6 @@ function maximumPathSumII(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumII(testTriangle);
```
# --solutions--

View File

@@ -41,22 +41,22 @@ Find the maximum total from top to bottom of the triangle below:
# --hints--
`maximumPathSumI(testTriangle)` should return a number.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumI(testTriangle) === 'number');
assert(typeof maximumPathSumI(_testTriangle) === 'number');
```
`maximumPathSumI(testTriangle)` should return 23.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumI(testTriangle), 23);
assert.strictEqual(maximumPathSumI(_testTriangle), 23);
```
`maximumPathSumI(numTriangle)` should return 1074.
`maximumPathSumI([[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]])` should return 1074.
```js
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
assert.strictEqual(maximumPathSumI(_numTriangle), 1074);
```
# --seed--
@@ -64,7 +64,9 @@ assert.strictEqual(maximumPathSumI(numTriangle), 1074);
## --before-user-code--
```js
const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _testTriangle = [[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]];
```
## --seed-contents--
@@ -74,13 +76,6 @@ function maximumPathSumI(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumI(testTriangle);
```
# --solutions--

View File

@@ -25,13 +25,13 @@ Find the maximum total from top to bottom in `numTriangle`, a 2D array defined i
# --hints--
`maximumPathSumII(testTriangle)` should return a number.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return a number.
```js
assert(typeof maximumPathSumII(_testTriangle) === 'number');
```
`maximumPathSumII(testTriangle)` should return 23.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` should return 23.
```js
assert.strictEqual(maximumPathSumII(_testTriangle), 23);
@@ -62,13 +62,6 @@ function maximumPathSumII(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumII(testTriangle);
```
# --solutions--

View File

@@ -41,22 +41,22 @@ dashedName: problem-18-maximum-path-sum-i
# --hints--
`maximumPathSumI(testTriangle)` має повернути число.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` має повернути число.
```js
assert(typeof maximumPathSumI(testTriangle) === 'number');
assert(typeof maximumPathSumI(_testTriangle) === 'number');
```
`maximumPathSumI(testTriangle)` має повернути 23.
`maximumPathSumI([[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` має повернути 23.
```js
assert.strictEqual(maximumPathSumI(testTriangle), 23);
assert.strictEqual(maximumPathSumI(_testTriangle), 23);
```
`maximumPathSumI(numTriangle)` має повернути 1074.
`maximumPathSumI([[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]])` має повернути 1074.
```js
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
assert.strictEqual(maximumPathSumI(_numTriangle), 1074);
```
# --seed--
@@ -64,7 +64,9 @@ assert.strictEqual(maximumPathSumI(numTriangle), 1074);
## --before-user-code--
```js
const numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _numTriangle = [[75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [17, 47, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [18, 35, 87, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [20, 4, 82, 47, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 1, 23, 75, 3, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0], [88, 2, 77, 73, 7, 63, 67, 0, 0, 0, 0, 0, 0, 0, 0], [99, 65, 4, 28, 6, 16, 70, 92, 0, 0, 0, 0, 0, 0, 0], [41, 41, 26, 56, 83, 40, 80, 70, 33, 0, 0, 0, 0, 0, 0], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29, 0, 0, 0, 0, 0], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14, 0, 0, 0, 0], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57, 0, 0, 0], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48, 0, 0], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31, 0], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]];
const _testTriangle = [[3, 0, 0, 0], [7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]];
```
## --seed-contents--
@@ -74,13 +76,6 @@ function maximumPathSumI(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumI(testTriangle);
```
# --solutions--

View File

@@ -25,13 +25,13 @@ dashedName: problem-67-maximum-path-sum-ii
# --hints--
`maximumPathSumII(testTriangle)` має повернути число.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` має повернути число.
```js
assert(typeof maximumPathSumII(_testTriangle) === 'number');
```
`maximumPathSumII(testTriangle)` має повернути 23.
`maximumPathSumII([[3, 0, 0, 0],[7, 4, 0, 0],[2, 4, 6, 0],[8, 5, 9, 3]])` має повернути 23.
```js
assert.strictEqual(maximumPathSumII(_testTriangle), 23);
@@ -62,13 +62,6 @@ function maximumPathSumII(triangle) {
return true;
}
const testTriangle = [[3, 0, 0, 0],
[7, 4, 0, 0],
[2, 4, 6, 0],
[8, 5, 9, 3]];
maximumPathSumII(testTriangle);
```
# --solutions--