1839 Commits

Author SHA1 Message Date
5b17ea1a93 chore(deps): bump rollup from 4.9.6 to 4.22.4 (#1690)
Bumps [rollup](https://github.com/rollup/rollup) from 4.9.6 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.9.6...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-04 22:34:29 +05:30
9010481c29 chore: update codecov-action to v4 (#1605)
The token has been added to the repository secrets.
2024-06-23 13:40:42 +02:00
8ceaa252b9 chore(deps-dev): bump braces from 3.0.2 to 3.0.3 (#1670)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-23 10:51:19 +05:30
5f8d4d447a [Compressor] RLE Compressor implementation (#1671)
* [Solution] Project euler challenge 19 with tests

* update leap year function

* Remove unnecessary, confusingly placed comments

* [COMPRESSOR] RLE

* [COMPRESSOR] RLE style fixed

---------

Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2024-06-23 10:50:25 +05:30
584424241c [Solution] Project euler challenge 19 with tests (#1659)
* [Solution] Project euler challenge 19 with tests

* update leap year function

* Remove unnecessary, confusingly placed comments

---------

Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2024-06-18 09:38:16 +05:30
0182bcacd0 style: remove listIn and listOut (#1669) 2024-06-12 01:41:12 +05:30
79b93d35b6 style: remove redundant eslint suppressions (#1667) 2024-06-12 01:40:48 +05:30
1554ba5f9c test: add tests for NumberOfSubsetEqualToGivenSum (#1661) 2024-05-25 16:31:54 +05:30
3623e4270f tests: add HexToDecimal.test.js (#1662) 2024-05-25 16:31:13 +05:30
e2b9754862 tests: add tests of LongestIncreasingSubsequence (#1660) 2024-05-23 19:45:08 +02:00
cc1e1dc643 GitHub Actions: Test on the current version of Node.js (#1657) 2024-05-17 17:28:38 +02:00
6bb02af09b Updated Documentation in README.md 2024-05-16 17:05:42 +02:00
6e27235fb7 Keep GitHub Actions up to date with GitHub's Dependabot
Fixes software supply chain safety warnings like at the bottom right of
https://github.com/TheAlgorithms/JavaScript/actions/runs/8960545794

* [Keeping your actions up to date with Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot)
* [Configuration options for the dependabot.yml file - package-ecosystem](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem)
2024-05-16 17:05:42 +02:00
6fe21d21e9 chore: convert functions to an ES2015 classes (#1656)
* chore: convert functions to an ES2015 classes

* remove unnecessary functions
2024-04-13 23:21:54 +05:30
314144fae6 Update CircularQueue.js for zero-length case (#1655)
* Update CircularQueue.js

* Update CircularQueue.js

Taking comments into account for refactoring my change.

* Update CircularQueue.js

Adding "this" to checkEmpty()
2024-04-03 20:55:30 +05:30
d920e7f427 refactor: reduce code duplication in FloodFill (#1645)
* tests: add tests checking if floodFill funtions throw when location is outside

* refactor: reduce code duplication by adding `checkLocation` to `FloodFill`

* refactor: add and use `isInside`

Co-authored-by: appgurueu <34514239+appgurueu@users.noreply.github.com>

* Deduplicate further

---------

Co-authored-by: appgurueu <34514239+appgurueu@users.noreply.github.com>
2024-04-03 20:54:06 +05:30
d02e402972 removed code already present in test cases related to DFT in Trees folder (#1648) 2024-04-03 20:50:00 +05:30
9c622dd089 refactor: add and use parseDate (#1643)
* refactor: add and use `parseDate`

* style: use proper spelling

Co-authored-by: appgurueu <34514239+appgurueu@users.noreply.github.com>

---------

Co-authored-by: appgurueu <34514239+appgurueu@users.noreply.github.com>
2024-04-03 20:49:26 +05:30
34a663aca7 fix: hadnle zeros at the endpoints in BisectionMethod (#1640)
* fix: hadnle zeros at the endpoints

* style: use simpler syntax express polynomials

Co-authored-by: appgurueu <34514239+appgurueu@users.noreply.github.com>

---------

Co-authored-by: appgurueu <34514239+appgurueu@users.noreply.github.com>
2024-04-03 20:48:45 +05:30
702840b4c8 style: improve test names of GetEuclidGCD' (#1646) 2024-03-28 16:42:40 +05:30
bd34e9fa61 feat: remove duplicated gcd-like functions (#1642)
* feat: remove duplicated `gcd`-like functions

* Updated Documentation in README.md

---------

Co-authored-by: vil02 <vil02@users.noreply.github.com>
2024-03-16 09:29:14 +05:30
0204198465 feat: remove twinPrime (#1641)
* tests: add missing test of `twinPrime`

* feat: remove `twinPrime`
2024-03-12 01:56:29 +05:30
4a4ed57d42 refactor: use isLeapYear (#1638) 2024-03-07 10:23:43 +05:30
d8cfdcd800 chore: use check-style in (#1630) 2024-03-05 03:37:16 +05:30
f13eec1bbb fix: properly floor the partial results (#1629) 2024-03-05 03:36:50 +05:30
2fe0dfde23 fix: throw form DateToDay (#1628) 2024-03-05 03:33:19 +05:30
83b4dd8290 fix: cleanup CheckKishnamurthyNumber (#1626) 2024-03-02 13:25:14 +05:30
894a46ca67 fix: throw error instead of returning it RailwayTimeConversion (#1625) 2024-03-02 13:24:46 +05:30
8734dfccf9 fix: handle zeros in CoPrimeCheck (#1622) 2024-02-29 10:36:08 +05:30
a5945e37c2 fix: throw error instead of returning it (#1624) 2024-02-29 10:25:11 +05:30
c067a34fae fix: GetEuclidGCD(0, 0) is 0 (#1621) 2024-02-28 11:47:22 +05:30
0e0cf98ce7 fix: cleanup CoPrimeCheck (#1609) 2024-02-27 14:24:29 +05:30
fb0a99c15a fix: throw error and add tests for ReverseNumber (#1608) 2024-02-19 19:26:54 +05:30
1ea7a5cd5e test: add missing test for SumOfGeometricProgression (#1607) 2024-02-14 21:13:38 +05:30
10febce31a style: cleanup PascalTriangle (#1606)
* tests: add missing tests for `PascalTriangle`

* style: remove redundant branch in `generate`

* tests: simplify tests of `PascalTriangle`
2024-02-09 22:31:20 +05:30
f31349812c tests: add tests for SHA256 (#1604) 2024-02-09 22:30:47 +05:30
6aaa376500 tests: add tests for SHA1 (#1602)
* tests: add tests for `SHA1`

* style: use `it.each`

---------

Co-authored-by: appgurueu <34514239+appgurueu@users.noreply.github.com>

---------

Co-authored-by: appgurueu <34514239+appgurueu@users.noreply.github.com>
2024-01-31 11:37:54 +05:30
cf0004190a docs: add codecov badge (#1600) 2024-01-29 11:00:44 +05:30
1d63400867 chore: add UploadCoverageReport.yml (#1599) 2024-01-27 22:28:12 +05:30
0e5cf5e843 tests: add missing test for KnightTour (#1598) 2024-01-27 22:27:40 +05:30
069803f271 style: remove trailing spaces (#1597) 2024-01-16 12:30:39 +05:30
83eb73b26f chore: update actions/checkout to v4 (#1595) 2024-01-16 00:29:53 +05:30
f0cfa8557f chore: update actions/setup-node to v4 (#1596) 2024-01-16 00:29:36 +05:30
203b7a0aa8 Properly evaluate GITHUB_ACTOR (#1594)
* fix: use `GITHUB_ACTOR` in `git config`

* Updated Documentation in README.md

---------

Co-authored-by: vil02 <vil02@users.noreply.github.com>
2024-01-13 20:55:28 +05:30
5a7e8d1325 implemented CycleDetectionII code in LinkedList (#1482)
* implemented CycleTectionII code

* changes made per review by appgurueu

* made the changes per review by appgurueu

* changes made per review by appgurueu

* did some changes

* fixed the test file with prettier

* Simplify code, renames for clarity

---------

Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2024-01-04 18:19:13 +05:30
1b66d86bd7 Implemented Palindrome Partitioning using Backtracking algorithm (#1591)
* Implemented Palindrome Partitioning using Backtracking algorithm

* fix:Updated palindromePartition algorithm

* code clean up

* Rephrase doc comment & move to appropriate function

---------

Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2023-11-28 09:58:32 +05:30
39d01138ec Abbreviation (#1547)
* Abbreviation

* Updates from code review
2023-11-15 19:25:30 +05:30
e9e3ea4684 Implemented Partition Problem, Recursive problem (#1582)
* Add Tug of War solution using backtracking

* Updated Documentation in README.md

* Added Tug of war problem link

* Updated Documentation in README.md

* Updated Documentation in README.md

* Refactor tugOfWar: remove unused vars, optimize initialization, and remove redundant checks

* Added Function Export Statment

* Updated Documentation in README.md

* Resolved Code Style --Prettier

* Rename "backtrack" to "recurse"

* Fix test case: The difference needs to be exactly 1.

* Code Modification: subsets should have sizes as close to n/2 as possible

* Updated test-case of TugOfWar

* Changed TugOfWar problem to Partition

* Modified partition problem

* Updated Documentation in README.md

* fixed code style

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2023-11-15 19:22:57 +05:30
a044c57401 docs: Update script usage in CONTRIBUTING.md (#1587) 2023-11-08 09:16:52 +05:30
cafb3433e8 Update AllCombinationsOfSizeK.js (#1530)
* Update AllCombinationsOfSizeK.js

* Update AllCombinationsOfSizeK.js

* Update AllCombinationsOfSizeK.test.js

Changes made it the type of testing. 
Instead of testing the class now the program will test the function

* Update AllCombinationsOfSizeK.js

* Update AllCombinationsOfSizeK.js

* Update AllCombinationsOfSizeK.js

* Update AllCombinationsOfSizeK.test.js

* Update AllCombinationsOfSizeK.test.js
2023-10-30 11:10:02 +05:30