* 📦 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
* 👌 IMPROVE: Added test cases for project euler problem 9
* Updated Documentation in README.md
* Updated Documentation in README.md
---------
Co-authored-by: Omkarnath Parida <omkarnath.parida@yocket.in>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* 📦 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>
* Implemented M Coloring Problem
* Implemented M Coloring Problem
* Switch to a functional approach instead of class-based.
Use proper JSDoc comments.
Refine the comments and remove redundancies.
* Updated Documentation in README.md
* Proper JSDoc comment
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
* feat: add RGB to HSL color format conversion algorithm
* test: add self-tests for rgb to hsl conversion algorithm
* fix: change function code to concise format
* fix: use throw and segregate the test cases
* chore: clean up the test format
* chore: use correct styling
* feat: add mergeTwoSortedLinkedLIsts algorithms
* remove class and unnecessary function
change the function params and return value from Node to LinkedList.
* 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>
* feat: add algorithm to evaluate postfix strings
* feat: add test case for evaluate expression
* update: add literature reference
* fix: import name in testcase
* fix: test case result
* Make clear that this is postfix
* Update tests
* add: see reference
* fixes mentioned issues
* Fix `default` case
---------
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.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>
* feat: New String Algorithm for LengthofLongestSubstringWithoutRepeatingCharacters
* Fixed Errors and Mistakes in New Algorithm LengthofLongestSubstringWithoutRepetition
* fix:#1389 Errors Fixed
* fix:#1389 Syntax and Code Errors Fixed
* fix:#1389 Errors FIxed
* Fixed All new errors
* fix:1389 Implemented suggestions and corrections
* Use @see annotation
---------
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>
* test: skip test that's running way too long
It's good to have the test there, but there's no use having it running for ~30 minutes or so in the GitHub Action
close#1193
* Updated Documentation in README.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* added an algo which finds unique element in an array
* fixed code style
* updated changes and add some explanations
* Delete package-lock.json
* Delete package.json
* added question link if anyone want to solve
* updated changes
* added package.json
* used JSDoc comment
---------
Co-authored-by: madhuredra <madhuredra.tiwari@zemosolabs.com>
* added algo for checking the number is power of four or not
* Update IsPowerofFour.js
* Update IsPowerofFour.js
* fix code style
* used proper JSDoc comment and fixed test issues
* fixed test case issue
---------
Co-authored-by: madhuredra <madhuredra.tiwari@zemosolabs.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>
* Update ValidateUrl.js
Used JS URL API to check if URL is valid. If valid it will return the url else false;
* Update ValidateUrl.js
Fixed for #1183
* Update ValidateUrl.js
fixed code style test.
Fixed for #1183
* Delete ValidateUrl.js
Fixes: #1183
* fix error in SinglyLinkedList head method
* test: update check head test for SinglyLinkedList
* fix: code style error
* fix: remove extra semicolons
---------
Co-authored-by: Bekzod <bekzodisakov18@gmail.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