fix(curriculum): typos in DC 148,156 + test in 132 (#64852)

This commit is contained in:
Tom
2025-12-23 05:00:37 -06:00
committed by GitHub
parent 3838a5f281
commit 0c0622b41b
8 changed files with 21 additions and 6 deletions
@@ -38,6 +38,12 @@ assert.deepEqual(purgeMostFrequent(["red", "blue", "green", "red", "blue", "gree
assert.deepEqual(purgeMostFrequent([5, 5, 5, 5]), []);
```
`purgeMostFrequent([10, 12, 7, 3, 7, 7, 12, 12])` should return `[10, 3]`.
```js
assert.deepEqual(purgeMostFrequent([10, 12, 7, 3, 7, 7, 12, 12]), [10, 3]);
```
# --seed--
## --seed-contents--
@@ -15,7 +15,7 @@ In the given matrix:
- An `"R"` is a seat occupied by a right-handed person.
- An `"L"` is a seat occupied by a left-handed person.
- An `"U"` is an unoccupied seat.
- A `"U"` is an unoccupied seat.
- Only unoccupied seats are available to sit at.
- The seats in the top row are facing "down", and the seats in the bottom row are facing "up" (like a table), so left and right are relative to the seat's orientation.
- Corner seats only have one seat next to them.
@@ -9,7 +9,7 @@ dashedName: challenge-148
Given an array with four numbers representing the tire pressures in psi of the four tires in your vehicle, and another array of two numbers representing the minimum and maximum pressure for your tires in bar, return an array of four strings describing each tire's status.
- 1 bar equal 14.5038 psi.
- 1 bar equals 14.5038 psi.
Return an array with the following values for each tire:
@@ -7,7 +7,7 @@ dashedName: challenge-156
# --description--
Given a positive integer, return `"Odd"` if it's an odd number, and `"Even"` is it's even.
Given a positive integer, return `"Odd"` if it's an odd number, and `"Even"` if it's even.
# --hints--
@@ -50,6 +50,15 @@ TestCase().assertEqual(purge_most_frequent([5, 5, 5, 5]), [])`)
}})
```
`purgeMostFrequent([10, 12, 7, 3, 7, 7, 12, 12])` should return `[10, 3]`.
```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(purge_most_frequent([10, 12, 7, 3, 7, 7, 12, 12]), [10, 3])`)
}})
```
# --seed--
## --seed-contents--
@@ -15,7 +15,7 @@ In the given matrix:
- An `"R"` is a seat occupied by a right-handed person.
- An `"L"` is a seat occupied by a left-handed person.
- An `"U"` is an unoccupied seat.
- A `"U"` is an unoccupied seat.
- Only unoccupied seats are available to sit at.
- The seats in the top row are facing "down", and the seats in the bottom row are facing "up" (like a table), so left and right are relative to the seat's orientation.
- Corner seats only have one seat next to them.
@@ -9,7 +9,7 @@ dashedName: challenge-148
Given an array with four numbers representing the tire pressures in psi of the four tires in your vehicle, and another array of two numbers representing the minimum and maximum pressure for your tires in bar, return an array of four strings describing each tire's status.
- 1 bar equal 14.5038 psi.
- 1 bar equals 14.5038 psi.
Return an array with the following values for each tire:
@@ -7,7 +7,7 @@ dashedName: challenge-156
# --description--
Given a positive integer, return `"Odd"` if it's an odd number, and `"Even"` is it's even.
Given a positive integer, return `"Odd"` if it's an odd number, and `"Even"` if it's even.
# --hints--