2 Commits

Author SHA1 Message Date
979046897d merge: Edit Perfect{Square, Cube} (#1071)
* Make `PerfectCube` more correct and readable

* Add negative and Infinity tests

* Fixed comment formatting

* Realized BigInt support is unnecessary

The algorithm would be exactly the same, so there's no added educational value

* Update PerfectCube.js

* Remove space

* Update PerfectCube.js

Now `isInt` is replaced by `isFinite`, because `isInt` is a redundant check

* Update PerfectCube.js

Remove dot

* Parity between `PerfectSquare` and `PerfectCube`

* Update PerfectSquare.test.js

Fixed the old copy-paste error that said "cube" instead of "square". And added `Infinity` test
2022-08-12 23:14:25 +05:30
cd6ec65e54 Add Algorithms to Math with tests (#429)
* chore: add area and area test

* chore: add armstrong number

* chore: add factors

* chore: add perfect cube

* chore: add perfect square

* chore: add perfect number

* chore: add number of digits

* chore: fix according to standardjs

* chore: remove conflicting files
2020-10-12 01:09:20 +05:30