chore: use specific assert methods in project euler problems (#60598)

This commit is contained in:
AishwaryaRajput09
2025-05-30 00:51:51 +05:30
committed by GitHub
parent 25cff1ecd8
commit 8114156602
5 changed files with 5 additions and 5 deletions
@@ -28,7 +28,7 @@ Using the `triangles` array containing coordinates of triangles, find the number
`triangleContainment(exampleTriangles)` should return a number.
```js
assert(typeof triangleContainment(_exampleTriangles) === 'number');
assert.isNumber(triangleContainment(_exampleTriangles));
```
`triangleContainment(exampleTriangles)` should return `1`.
@@ -29,7 +29,7 @@ Give your answer with hexadecimal number as a string.
`hexadecimalNumbers()` should return a string.
```js
assert(typeof hexadecimalNumbers() === 'string');
assert.isString(hexadecimalNumbers());
```
`hexadecimalNumbers()` should return the string `3D58725572C62302`.
@@ -34,7 +34,7 @@ Give your answer as a string with comma separated integers, without any whitespa
`shortenedBinaryExpansionOfNumber()` should return a string.
```js
assert(typeof shortenedBinaryExpansionOfNumber() === 'string');
assert.isString(shortenedBinaryExpansionOfNumber());
```
`shortenedBinaryExpansionOfNumber()` should return the string `1,13717420,8`.
@@ -38,7 +38,7 @@ For any given `p` and `q`, find the sum of all values of `e`, `1 < e < φ(p,q)`
`RSAEncryption` should be a function.
```js
assert(typeof RSAEncryption === 'function')
assert.isFunction(RSAEncryption);
```
`RSAEncryption` should return a number.
@@ -21,7 +21,7 @@ What fraction of the area is not covered by circles after `n` iterations? Give y
`iterativeCirclePacking(10)` should return a number.
```js
assert(typeof iterativeCirclePacking(10) === 'number');
assert.isNumber(iterativeCirclePacking(10));
```
`iterativeCirclePacking(10)` should return `0.00396087`.