1846 Commits

Author SHA1 Message Date
1d252d7aca feat: add tests for binary search trees (#1769) 2025-01-15 16:41:02 +05:30
a62a46e732 Resolve duplicate entries for sieve of eratosthenes (#1770)
* remove intarr test

* Remove main file oops

* FIXES: #1666 , remove references to SieveOfEratosthenesIntArray

* Finally fix the requirements, passes vitest

* Updated Documentation in README.md

* FIXES: #1666 and conform to alg comment standards

---------

Co-authored-by: SpiderMath <SpiderMath@users.noreply.github.com>
2025-01-12 15:57:54 +05:30
85a55daf49 test: added for Linear Search Algorithm (#1753)
* test: added for Linear Search Algorithm

* Update Search/LinearSearch.js

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

---------

Co-authored-by: Hridyanshu7 <himank7794@gmail.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2024-12-20 21:35:50 +05:30
d8588f9de1 Add tests for Project euler problem 14 solution (#1713)
* 📦 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

* 📦 NEW: Testcases for Project Euler Problem 14

* Updated Documentation in README.md

* 👌 IMPROVE: code improvements

---------

Co-authored-by: Omkarnath Parida <omkarnath.parida@yocket.in>
Co-authored-by: pomkarnath98 <pomkarnath98@users.noreply.github.com>
2024-11-16 21:38:17 +05:30
55ff0ade85 docs: fixed misleading comment about the array method (forEach instead of reduce) used in AverageMean.js (#1727)
* docs: fixed misleading comment about the array method (forEach instead of reduce) used in AverageMean.js

* fix: optimized AverageMean.js by removing redundant comments and unnecessary operations.

* Update Maths/AverageMean.js

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

---------

Co-authored-by: Hridyanshu7 <himank7794@gmail.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2024-10-16 23:52:31 +05:30
ff314a2bed Add tests for Project Euler Problem 5 + minor refactor (#1691) 2024-10-09 01:54:11 +02:00
18da83a5b7 chore(deps): bump vite from 5.0.12 to 5.4.8 (#1711)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.12 to 5.4.8.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.8/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.8/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  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-05 23:40:52 +05:30
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