24 Commits

Author SHA1 Message Date
79b93d35b6 style: remove redundant eslint suppressions (#1667) 2024-06-12 01:40:48 +05:30
0e5cf5e843 tests: add missing test for KnightTour (#1598) 2024-01-27 22:27:40 +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
28c27d9474 chore: format using prettier 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
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
49bd1fd0c2 Adding to backtracking (#1289)
* adding generate-parenthses algorithm

* adding generateParenthses algorithm

* adding generate parentheses algorithm

* fixing comments according to the JDoc comments, cleaning code

* fixing comments
2023-02-13 17:09:31 +05:30
71d3d4470f tests: improve for GeneratePermutations (#1263) 2022-11-13 23:11:54 +05:30
10079a7b70 Renamed NQueen file, variables to NQueens, raised RangeError exception (#1162) 2022-10-13 17:22:59 +05:30
df4a783b06 Complying with JavaScript Standard Style (npx standard --fix). 2021-10-11 15:49:24 +02:00
7f6a53ad4a KnightTour : convert live code example to Jest test (log remaining is within a print method). 2021-10-09 15:05:52 +02:00
09da5eef17 Fix GeneratePermutations so that it actually returns the permutations instead of logging them + add Jest test. 2021-10-09 14:29:44 +02:00
4f4deac8d4 Fix #748 : Revise algorithm implementation so that it actually returns the combinations. Fix test (was not running, .mjs not matching Jest pattern) and work. 2021-10-09 14:07:27 +02:00
7be5ce0f1b chore: Merge pull request #748 from chiranjeev-thapliyal/master
added Backtracking/AllCombinationsOfSizeK
2021-10-06 14:39:39 +05:30
254f90bca1 added tests for Backtracking/AllCombinationsOfSizeK 2021-10-06 14:03:27 +05:30
b5167878c4 Merge pull request #714 from defaude/test/Backtracking/RatInAMaze
Rewrote "Rat in a maze" algorithm + added tests
2021-10-03 21:30:50 +05:30
28f13bb260 Apply standard code style
Sadly, standard does not support private fields (yet)
2021-10-03 16:04:06 +02:00
2b3db6c1d5 Apply standard code style 2021-10-03 15:11:15 +02:00
44fee4167f Code style 2021-10-03 10:15:35 +02:00
0d5a3cef48 Made the "complex" test harder, forcing the algorithm to actually back-track ;) 2021-10-03 10:05:33 +02:00
78616fcadd Rewrote "Rat in a maze" algorithm
It's based on the previous implementation but offers a better API and is now properly testable, too
2021-10-03 00:54:14 +02:00
eb99bdc06b Add proper test to Backtracking/Sudoku
This replaces the "main" test in the implementation file.
2021-10-02 22:51:25 +02:00
dd19680261 chore: merge "Added backtracking sum of subset (#702)"
* sum of subset algorithm

* set returns comment

* fix comment

* add resource url to comments

* separate test to different file and format
2021-10-01 10:18:49 +05:30
e9fd4a93e4 Fixes #620 2021-06-06 12:06:36 +06:00