330 Commits

Author SHA1 Message Date
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
ff314a2bed Add tests for Project Euler Problem 5 + minor refactor (#1691) 2024-10-09 01:54:11 +02:00
6bb02af09b Updated Documentation in README.md 2024-05-16 17:05:42 +02:00
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
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
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
d74f242ac4 Rabin Karp Search Algorithm (#1545)
* Search: Rabin-Karp algorithm

* Prettier Style

* Search: Rabin-Karp adding reference

* Search: Rabin-Karp styling and remove unecessary logging

* Search: Rabin-Karp review notes

* Simplify return

* Updated Documentation in README.md

---------

Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-30 11:00:31 +05:30
aebd52f39f chore: update readme 2023-10-28 10:53:43 +05:30
fb134b10b0 Implemented M Coloring Problem (#1562)
* 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>
2023-10-24 06:48:59 +00:00
05e32481fa chore: format code (#1515)
* chore: format code

* Updated Documentation in README.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-12 06:32:18 +00:00
d7dc85232c feat: Key finder improvement (#1456)
* Improve algorithm

* Updated Documentation in README.md

* Updated Documentation in README.md

* Remove unwanted changes

* Make the changes fit

* Updated Documentation in README.md

---------

Co-authored-by: IcarusTheFly <IcarusTheFly@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-10 12:29:51 +05:30
86d333ee94 feat: Test running overhaul, switch to Prettier & reformat everything (#1407)
* 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>
2023-10-04 02:38:19 +05:30
7ff3e5e49e test: skip test that's running way too long (#1393)
* 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>
2023-10-02 12:38:14 +05:30
00e40e6f06 Fix/code smells (#1338)
* ♻️ refactor: improving and fixing some code

* Updated Documentation in README.md

* ♻️ refactor: improving isLeapYear

* 🐛 chore: back changes

* 🐛 fix: using reduce instead forEach

* 🐛 fix: using reduce instead forEach

* 🐛 fix: removing duplicated code

* 🐛 chore: removing .js

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-21 23:36:43 +05:30
1381ed0c17 feat: add dutchNationalFlagSort implementation (#1305)
* feat: add dutchNationalFlagSort implementation

* fix: add test, fit code style

* fix: add link to directory.md
2023-03-04 10:39:21 +05:30
b36b45888e docs: fix CI and remove LGTM badges (#1269)
* Updated Documentation in README.md

* docs: fix CI and remove LGTM badges

LGTM is no longer a supported service and has been integrated with GitHub (which is now CodeQL).
We can create a CodeQL workflow and integrate it into the repository, however, that fits for another PR.

The shields badge API was updated, thus, causing an invalid badge: https://github.com/badges/shields/issues/8671

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-12-17 11:52:15 +05:30
640abcf468 fix: exchanging wrong path that breaks pipeline (#1262) 2022-11-02 13:54:05 +01:00
0fab492ceb fix: Project Euler P35 off-by-one error (#1238)
* fix: Project Euler P35 off-by-one error

* Updated Documentation in README.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-10-28 22:21:54 +05:30
63a3394d95 algorithm: letter combinations (#1209) 2022-10-21 16:54:37 +05:30
21d73b6447 algorithm: unique paths (#1211)
* dp problem

* update Directory.md

* suggested changes
2022-10-20 20:29:36 +05:30
ff606a019e chore: improve the Gitpod file (#1203)
* chore: improve the Gitpod file

* Updated Documentation in README.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-10-17 16:56:18 -05:00
2a62eabfd7 tests: Project Euler Problem 2 (#1200) 2022-10-17 01:52:29 +05:30
4ce3dbe6b4 dependencies: update and clean (and auto-fix style issues) (#1195)
* Update npm dependencies (and auto-fix style issues)

* Updated Documentation in README.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-10-16 16:09:56 +05:30
bd7de6a010 chore: Remove unused deps, clean up package.json a bit (#1176) 2022-10-13 17:27:05 +02:00
d05bbf77c6 algorithm: first unique char in a string (#1103)
* feat: Added Algo first unique char in a string.

* Optimised algo to linear time complexity

* removed double quotes

* Review changes: if-else logic
2022-09-22 17:20:04 +05:30
ad41e8cc1c fix: spellings which are making ci fail (#1089)
* Updated Documentation in README.md

* chore: remove wrong spelling

* ci: recognize "falsy" as correct spelling

* chore: fix spelling

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-09-05 11:06:24 +05:30
e9b8b136b9 merge: Implement Shor's factorization algorithm (#1070)
* Updated Documentation in README.md

* merge: Fix GetEuclidGCD (#1068) (#1069)

* Fix GetEuclidGCD

Implement the actual Euclidean Algorithm

* Replace == with ===

* Lua > JS

* Standard sucks

* Oops

* Update GetEuclidGCD.js

* Updated Documentation in README.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>

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

* feat: implement Shor's Algorithm

* chore: add tests

* Updated Documentation in README.md

* chore: fix spelling

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2022-08-07 12:33:43 +05:30
1a089cc491 merge: Fix GetEuclidGCD (#1068)
* Fix GetEuclidGCD

Implement the actual Euclidean Algorithm

* Replace == with ===

* Lua > JS

* Standard sucks

* Oops

* Update GetEuclidGCD.js

* Updated Documentation in README.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-07-27 18:43:07 +05:30
bbbf343971 merge: Fix IsPalindrome Big-O analysis (#1054)
* Fix IsPalindrome Big-O analysis

* Updated Documentation in README.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-07-01 22:52:04 +05:30
dbffac253d merge: FindSecondLargestElement: Support negative numbers (#1036)
* FindSecondLargestElement: Support negative numbers

* Updated Documentation in README.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-06-03 22:37:49 +05:30
e447b5545d merge: Update directory workflow (#1000)
* chore: update directory workflow

Workflow now only runs on `pull_request` to prevent pushing on the master branch.

* chore: update commit mechanism

* chore: remove rundundant script

* Update UpdateDirectory.yml

* Updated Documentation in README.md

* Update UpdateDirectory.yml

* fix: replace wrong variable

* Updated Documentation in README.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-04-28 18:58:12 +05:30
7881cb5f16 Add Boyer-Moore string search algorithm (#990)
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-04-23 13:06:41 +02:00
eb36e2de62 merge: Format codebase with standard.js (#989)
* Auto-update DIRECTORY.md

* fix: some redundancy according to standard javascript library

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-04-21 11:38:38 +05:30
2be0fdcb49 merge: Decimal Expansion (#787)
* Add Math function for representing the decimal expansion of a given fraction (decimal or any base from 2 to 10).

* Auto-update DIRECTORY.md

* DecimalExpansion Jest tests.

* chore: trigger update

* Auto-update DIRECTORY.md

* Auto-update DIRECTORY.md

* chore: trigger checks

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Rak Laptudirm <rak@laptudirm.com>
Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
2022-04-02 20:40:57 +05:30
6bd2ac682d merge: Decrease time period for marking an issue stale (#885)
* chore: mark stale after 7 days of inactivity

* Auto-update DIRECTORY.md

* chore: length info provided in comments

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-02-16 19:26:34 +05:30
c496925d25 merge: rename SinglyLinkList to SinglyLinkedList (#881) 2022-02-14 13:49:10 +05:30
f387ff327c chore: Remove duplicate DigitSum algorithm (#873)
* Auto-update DIRECTORY.md

* chore: remove duplicate algorithm

* Auto-update DIRECTORY.md

* chore: remove duplicate algorithm tests

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-12-11 13:40:11 +05:30
85b0571d81 chore: Strings: Credit Card Validation (#830)
* Add credit card number validator

- Validates the credit card number based on Luhn algorithm

* Test Cases: ValidateCreditCard

* Auto-update DIRECTORY.md

* Fix: Spell check

* Add references and move const inside function

* Add comments

* Fix trailing spaces

* Add short description

* Remove trailing spaces

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-11-04 13:34:52 +05:30
64920bf1a3 merge: Removed ignored code files form codespell workflow. (#834)
* Auto-update DIRECTORY.md

* chore: remove ignored code files

* chore: ignore more words

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-11-03 11:26:38 +05:30
2619ab673f merge: Added bisection method (#827)
* feat: Added bisection method

* Auto-update DIRECTORY.md

Co-authored-by: ggkogkou <ggkogkou@ggkogkou.gr>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-10-31 22:30:46 +05:30
f692da2448 Auto-update DIRECTORY.md 2021-10-31 16:59:15 +00:00
1cd3b8683a merge: Created midpoint integration numerical method (#822)
* Created midpoint integration numerical method

* Auto-update DIRECTORY.md

* Added resources link

* Fixed doxumentation

* Fixed spelling error

Co-authored-by: ggkogkou <ggkogkou@ggkogkou.gr>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-10-28 18:09:40 +05:30
072523d594 merge: Fix spellings (#821)
* chore: remove codespell from ci

* feat: add codespell workflow

* fix: codespell workflow

* fix: ignore spellings in directory

* chore: fix spellings

./Dynamic-Programming/KadaneAlgo.js:2: contiguos ==> contiguous
./Dynamic-Programming/KadaneAlgo.js:14: posible ==> possible

* chore: fix spelling

./Dynamic-Programming/SieveOfEratosthenes.js:4: upto ==> up to

* chore: fix spellings

./Dynamic-Programming/MaxNonAdjacentSum.js:22: Exmaple ==> Example

* chore: fix spelling

./Project-Euler/test/Problem010.test.js:4: upto ==> up to
./Project-Euler/test/Problem010.test.js:8: upto ==> up to
./Project-Euler/test/Problem010.test.js:12: upto ==> up to

* chore: fix spelling

./String/AlphaNumericPalindrome.js:10: recieves ==> receives
./String/AlphaNumericPalindrome.js:10: sting ==> string
./String/AlphaNumericPalindrome.js:46: varaible ==> variable

* chore: fix spelling

./String/DiceCoefficient.js:3: stings ==> strings

* chore: fix spelling

./String/test/DiceCoefficient.test.js:9: atleast ==> at least

* chore: fix spelling

./String/test/MaxWord.test.js:8: ba ==> be

* chore: ignore `PermutateString.test.js`

* chore: fix spelling

./String/test/CheckVowels.test.js:62: occurances ==> occurrences

* chore: ignore `SubsequenceRecursive.js`

* chore: fix spelling

./Conversions/TemperatureConversion.js:2: arguement ==> argument

* chore: fix spelling

./Conversions/RailwayTimeConversion.js:7: Formate ==> Format
./Conversions/RailwayTimeConversion.js:8: Formate ==> Format

* chore: remove Linear Algebra

The deleted directory hosted a package which are not accepted by this repository.

* Auto-update DIRECTORY.md

* chore: fix spelling

* chore: fix spellings

* merge: Created composite Simpson's integration method. Tests included. (#819)

* Created composite Simpson's integration method.Tests included

* Minor corrections

* Auto-update DIRECTORY.md

* Styled with standard.js

* chore: remove blank line

* chore: remove blank line

Co-authored-by: ggkogkou <ggkogkou@ggkogkou.gr>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: remove codespell from ci

* feat: add codespell workflow

* fix: codespell workflow

* fix: ignore spellings in directory

* chore: fix spellings

./Dynamic-Programming/KadaneAlgo.js:2: contiguos ==> contiguous
./Dynamic-Programming/KadaneAlgo.js:14: posible ==> possible

* chore: fix spelling

./Dynamic-Programming/SieveOfEratosthenes.js:4: upto ==> up to

* chore: fix spellings

./Dynamic-Programming/MaxNonAdjacentSum.js:22: Exmaple ==> Example

* chore: fix spelling

./Project-Euler/test/Problem010.test.js:4: upto ==> up to
./Project-Euler/test/Problem010.test.js:8: upto ==> up to
./Project-Euler/test/Problem010.test.js:12: upto ==> up to

* chore: fix spelling

./String/AlphaNumericPalindrome.js:10: recieves ==> receives
./String/AlphaNumericPalindrome.js:10: sting ==> string
./String/AlphaNumericPalindrome.js:46: varaible ==> variable

* chore: fix spelling

./String/DiceCoefficient.js:3: stings ==> strings

* chore: fix spelling

./String/test/DiceCoefficient.test.js:9: atleast ==> at least

* chore: fix spelling

./String/test/MaxWord.test.js:8: ba ==> be

* chore: ignore `PermutateString.test.js`

* chore: fix spelling

./String/test/CheckVowels.test.js:62: occurances ==> occurrences

* chore: ignore `SubsequenceRecursive.js`

* chore: fix spelling

./Conversions/TemperatureConversion.js:2: arguement ==> argument

* chore: fix spelling

./Conversions/RailwayTimeConversion.js:7: Formate ==> Format
./Conversions/RailwayTimeConversion.js:8: Formate ==> Format

* chore: remove Linear Algebra

The deleted directory hosted a package which are not accepted by this repository.

* Auto-update DIRECTORY.md

* chore: fix spelling

* chore: fix spellings

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: fix spelling

* chore: no need to check filenames

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: ggkogkou <76820848+ggkogkou@users.noreply.github.com>
Co-authored-by: ggkogkou <ggkogkou@ggkogkou.gr>
2021-10-28 15:37:43 +05:30
7722870183 merge: Created composite Simpson's integration method. Tests included. (#819)
* Created composite Simpson's integration method.Tests included

* Minor corrections

* Auto-update DIRECTORY.md

* Styled with standard.js

* chore: remove blank line

* chore: remove blank line

Co-authored-by: ggkogkou <ggkogkou@ggkogkou.gr>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
2021-10-28 15:07:07 +05:30
82db978dc5 Auto-update DIRECTORY.md 2021-10-28 06:45:28 +00:00
00900f1446 Auto-update DIRECTORY.md 2021-10-28 06:38:14 +00:00
970b4f2827 Auto-update DIRECTORY.md 2021-10-27 17:50:15 +00:00
4e18bbdeb6 Auto-update DIRECTORY.md 2021-10-26 12:35:57 +00:00
4fa3c5ecd4 Auto-update DIRECTORY.md 2021-10-26 11:27:09 +00:00