* 📦 NEW: Added solution for ProjectEuler-007
* 🐛 FIX: Spelling mistake fixes
* 👌 IMPROVE: changed variable name from `inc` to `candidateValue` and thrown error in case of invalid input
* 👌 IMPROVE: Modified the code
* 👌 IMPROVE: Added test case for ProjectEuler Problem001
* 👌 IMPROVE: Added test cases for Project Euler Problem 4
* 👌 IMPROVE: auto prettier fixes
---------
Co-authored-by: Omkarnath Parida <omkarnath.parida@yocket.in>
* feat: add determinant calculating algorithm
* test: add self-tests for determinant algorithm
* chore: add wikipedia info link
* fix: change initialization to zero
* fix: add error throw and general code improvements
* fix: add error try and catch
* fix: seperate the test loops of error cases
* clean up a bit
---------
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
* Combined Min Heap and Max Heap classes
* Added JSdoc comments and also improved tests for binary heap
* Added private methods for BinaryHeap class
* JSDoc knows that a class is a class
I assume the @class tag is for classes implemented via constructor functions, not using ES6 class syntax
---------
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
* bug: update edge case for empty array
* bug: add edge case for empty arrays
* feat: add test case for empty array
---------
Co-authored-by: Ridge Kimani <ridgekimani@gmail.com>
* fix: #758 optimised armstrongNumber code
* fix:#758 Average Median code optimised
* feat: TwoSum function added with test cases
* revert code
* Fix: #758 used ternary operator to make code more optimised
* Feat: TwoSum function created with test cases
* Feat: TwoSum function created with test cases
* Resolved comments and changes requests
* chore: Switch to Node 20 + Vitest
* chore: migrate to vitest mock functions
* chore: code style (switch to prettier)
* test: re-enable long-running test
Seems the switch to Node 20 and Vitest has vastly improved the code's and / or the test's runtime!
see #1193
* chore: code style
* chore: fix failing tests
* Updated Documentation in README.md
* Update contribution guidelines to state usage of Prettier
* fix: set prettier printWidth back to 80
* chore: apply updated code style automatically
* fix: set prettier line endings to lf again
* chore: apply updated code style automatically
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
* test: remove ValidateUrl.test.js
The code was removed with ecac786d but the test was left here (and has been failing since then, obviously 🤣)
* test: remove conflicting test case
There is another test case that explicitly expects the `null` result when the input array only contains one element.
* Updated Documentation in README.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added QuadraticRoots in the Math/QuadraticRoots
* Fixed math/QyadraticRoots var to let
* Added relevant links math/QyadraticRoots
* Added relevant links math/QyadraticRoots and fixed let - const
* Added the changes and @see notation in Math/QuadraticRoots.js
* Added the changes Math/QuadraticRoots.js and return an empty []
* Readd describe block, remove redundant comments
* Changed [1,1] to [1]
---------
Co-authored-by: Dibya <Dibya.DebayanDash@siriuscom.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
* added fibonacci using formula along with test cases
* updated the changes
* added jest's each in test cases
* added jest's each for testing
* returned inline value
* removed redundant comment
* hoisted the variables
* Use shorthand
* considered adding resource of the formula
---------
Co-authored-by: madhuredra <madhuredra.tiwari@zemosolabs.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
* [feat] New algorithm
* [test] Add new test for ParityOutlier.js
* [fix] Reset indentation
* [fix] Reset indentation
* [fix] Style changes
* fix: improve code efficiency and a glitch
* test: adds a new possible test case
* fix: style fix
* fix: delete redundant comments and else statements
* [fix] style fix
* feat: Add check number case
* style: Fix formatting
* fix: Remove number check part
* feat: Create isPalindromeIntegerNumber
* test: Add minus number case
* Add an algorithm to find length and area of an arc of a circle
* Updated to follow Javascript Standard Style
* Update CircularArc.js
* Update CircularArc.js
* Add tests
* Followed Javascript standard style
* feat: Add mobius function implementation
* test: Add tests for mobius function
* fix: Code style fixes
* fix: Code style fixes
* fix: Store prime factors in a variable & add throw error
* fix: Fix unit tests for zero and negative numbers
* fix: Minor code style fixes
* 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