fix(curriculum): remove before/after-user-code from rosetta challenges 11-15 (#66391)

This commit is contained in:
Sem Bauke
2026-03-13 11:35:08 +01:00
committed by GitHub
parent 1bc166aa08
commit 062b3b2002
5 changed files with 40 additions and 55 deletions

View File

@@ -14,6 +14,13 @@ The case where the collection is empty may be ignored. Care must be taken to han
If it is not appropriate or possible to support a general collection, use a vector (array), if possible. If it is not appropriate or possible to support an unspecified value type, use integers.
# --before-each--
```js
const arr1 = [1, 3, 6, 6, 6, 6, 7, 7, 12, 12, 17];
const arr2 = [1, 2, 4, 4, 1];
```
# --hints--
`mode` should be a function.
@@ -36,13 +43,6 @@ assert.deepEqual(mode(arr2).sort(), [1, 4]);
# --seed--
## --after-user-code--
```js
const arr1 = [1, 3, 6, 6, 6, 6, 7, 7, 12, 12, 17];
const arr2 = [1, 2, 4, 4, 1];
```
## --seed-contents--
```js

View File

@@ -48,14 +48,6 @@ assert(typeof pythagoreanMeans === 'function');
`pythagoreanMeans([1, 2, ..., 10])` should equal the same output above.
```js
assert.deepEqual(pythagoreanMeans(range1), answer1);
```
# --seed--
## --after-user-code--
```js
const range1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const answer1 = {
@@ -66,8 +58,11 @@ const answer1 = {
},
test: 'is A >= G >= H ? yes'
};
assert.deepEqual(pythagoreanMeans(range1), answer1);
```
# --seed--
## --seed-contents--
```js

View File

@@ -25,18 +25,13 @@ assert(typeof rms === 'function');
`rms([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])` should equal `6.2048368229954285`.
```js
const arr1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const answer1 = 6.2048368229954285;
assert.equal(rms(arr1), answer1);
```
# --seed--
## --after-user-code--
```js
const arr1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const answer1 = 6.2048368229954285;
```
## --seed-contents--
```js

View File

@@ -34,19 +34,14 @@ assert(typeof babbage === 'function');
`babbage(99736, 269696)` should not return 99736 (there is a smaller answer).
```js
const babbageAns = 99736;
const endDigits = 269696;
const answer = 25264;
assert.equal(babbage(babbageAns, endDigits), answer);
```
# --seed--
## --after-user-code--
```js
const babbageAns = 99736;
const endDigits = 269696;
const answer = 25264;
```
## --seed-contents--
```js

View File

@@ -20,6 +20,31 @@ Determine whether a generated string of brackets is balanced; that is, whether i
| <code>\[]]\[\[]</code> | false |
| <code>\[\[\[\[]]]]</code> | true |
# --before-each--
```js
const testCases = [
'[]',
']][[[][][][]][',
'[][[[[][][[[]]]]]]',
'][',
'[[[]]]][[]',
'][[]',
'][[][]][[[]]',
'[[][]]][',
'[[[]]][[]]]][][[',
'[]][[]]][[[[][]]',
'][]][[][',
'[[]][[][]]',
'[[]]',
']][]][[]][[[',
'][]][][[',
'][][',
'[]]]',
''
];
```
# --hints--
`isBalanced` should be a function.
@@ -138,31 +163,6 @@ assert(isBalanced(testCases[17]));
# --seed--
## --after-user-code--
```js
const testCases = [
'[]',
']][[[][][][]][',
'[][[[[][][[[]]]]]]',
'][',
'[[[]]]][[]',
'][[]',
'][[][]][[[]]',
'[[][]]][',
'[[[]]][[]]]][][[',
'[]][[]]][[[[][]]',
'][]][[][',
'[[]][[][]]',
'[[]]',
']][]][[]][[[',
'][]][][[',
'][][',
'[]]]',
''
];
```
## --seed-contents--
```js