Commit Graph

84 Commits

Author SHA1 Message Date
Roland Hummel
bd7de6a010 chore: Remove unused deps, clean up package.json a bit (#1176) 2022-10-13 17:27:05 +02:00
Anton Yakutovich
56713e8f43 Upgrade actions in Ci.yml workflow (#1153) 2022-10-09 17:35:06 +05:30
Rak Laptudirm
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
Fahim Faisaal
cbc669aa9d merge: Upgraded Algorithm of alpha numeric palindrome (#1006)
* feat: improved memoize function

used Map instead of object & used the JSON.stringfy method for generate a valid string as a key

* docs: modified documentation

* style: format with standard

* docs: modified stringify doc

* refactor: remove two repetition implementation

* feat: added validation, test codes

* chore: remove useless words

* feat: added types for jest

* chore: added link box

* feat: added new validation test casses & methods

* style: formated with standard

* feat: added parse method & test cases

* docs: added js docs

* chore: added default import export

* feat: imporved algorithm via replace method

* test: added two test cases

* feat: added jest type for suggestions

* feat: added `reduceRight` & `trim` method

* chore: added helper variable

* feat: added new rotation option

* Revert "chore: added helper variable"

This reverts commit 489544da0a.

* remove: yarn lock

* chore: fix grammer

* feat: used replace method & added test case

* feat: remove revert

* chore: added new line

* feat: optimized algo n to n / 2 & replaced test cases

* chore: update node version

* chore: set node version to lts

* chore: updated the node version & added engines prop

* resolve: removed while loop

* chore: added right shift ops comment

* chore: update comment

* chore: removed abs

Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
2022-05-07 17:42:50 +05:30
Lars Müller
b81c339b59 merge: Improve pull request template (#1002) 2022-05-04 22:32:08 +05:30
Rak Laptudirm
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
Rak Laptudirm
6d5e641e6e merge: tweak DIRECTORY.md generation (#999)
* tests: change extention of helper file

* chore: revert previous change

* chore: ignore dirs with name "test"

* docs: update directory styling

Removed headings from `DIRECTORY.md` generation.

* refactor: make code more idiomatic

* docs: format directories to be bold

* chore: change char conting method

* fix: add 1 to ident count
2022-04-28 15:43:45 +05:30
Rak Laptudirm
1e0dd1c44f chore: add appgurueu to CODEOWNERS 2022-04-21 11:40:49 +05:30
David Leal
40989326f1 Change 1 week to 2 weeks for stale issues 2022-04-17 20:14:59 -05:00
Rak Laptudirm
48e3e8d8c9 chore: use stale label to mark something as stale 2022-04-16 21:26:08 +05:30
Rak Laptudirm
42b9f64ea1 merge: Update workflow organization and environments (#971)
* chore: only run update directory on `master`

* chore: move codespell to CI workflow

* chore: remove codespell workflow(moved)

* chore: listen for `push` only on `master`

* chore: remove `pull_request` type params
2022-04-03 12:36:12 +05:30
Fahim Faisaal
cc55dabb4b merge: Updated pull_request_template (#913) 2022-03-02 21:58:41 +05:30
Rak Laptudirm
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
Rak Laptudirm
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
Aditya Parmar
308b022b03 merge: Sliding window (#833)
* new algorithm 'Sliding-Window' added with example 'Longest Substring Without Repeating Characters'

* new example of sliding window 'Permutation in String' added

* chore: add `ignore_words_list`

* sliding-window moved into Dynamic-programming directory

Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
2021-11-03 09:33:20 +05:30
David Leal
12cf29ef18 fix: endlines in the CI file 2021-11-02 10:57:57 -06:00
Rak Laptudirm
3723322bd0 fix: update file name 2021-10-28 18:48:36 +05:30
Rak Laptudirm
9120085bdf chore: use UpperCamelCase 2021-10-28 18:46:50 +05:30
Rak Laptudirm
d2883fe6ef chore: use UpperCamelCase 2021-10-28 18:46:20 +05:30
Rak Laptudirm
01a2e9ac9e chore: use UpperCamelCase 2021-10-28 18:45:57 +05:30
Rak Laptudirm
2203c1a0e4 chore: use UpperCamelCase 2021-10-28 18:45:36 +05:30
Rak Laptudirm
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
Rak Laptudirm
59e9baf11b feat: add codespell 2021-10-28 12:34:59 +05:30
@im_8055
54de6e5372 merge: Fix pull request template (#818)
The existing template uses * to apply the bold font weight. As we
already have the ### to markdown the text as heading, its redundant to
have the *s.
2021-10-27 23:17:32 +05:30
Oscar Dominguez
f640550d54 ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows 2021-10-12 21:15:53 +02:00
Roland Hummel
b13b12e88c chore: merge Fix/742 migrate doctest to jest (#749)
* Remove QuickSelect doctest

There are more Jest test cases already.

* Remove AverageMedian doctest

Already migrated to jest

* Migrate doctest for BinaryExponentiationRecursive.js

(also remove inline "main" test method)

* Migrate doctest for EulersTotient.js

(also remove inline "main" test method)

* Migrate doctest for PrimeFactors.js

(also remove inline "main" test method)

* Migrate doctest for BogoSort.js

Re-write prototype-polluting helper methods, too.

(also remove inline test driver code)

* Migrate doctest for BeadSort.js

(also remove inline test driver code)

* Migrate doctest for BucketSort.js

(also remove inline test driver code)

* Migrate doctest for CocktailShakerSort.js

(also remove inline test driver code)

* Migrate doctest for MergeSort.js

(also remove inline test driver code)

* Migrate doctest for QuickSort.js

(also remove inline test driver code)

* Migrate doctest for ReverseString.js

(also remove inline test driver code)

* Migrate doctest for ReverseString.js

* Migrate doctest for ValidateEmail.js

* Migrate doctest for ConwaysGameOfLife.js

(remove the animate code, too)

* Remove TernarySearch doctest

Already migrated to jest

* Migrate doctest for BubbleSort.js

(also remove inline test driver code)

* Remove doctest from CI and from dependencies

relates to #742
fixes #586

* Migrate doctest for RgbHsvConversion.js

* Add --fix option to "standard" npm script

* Migrate doctest for BreadthFirstSearch.js

(also remove inline test driver code)

* Migrate doctest for BreadthFirstShortestPath.js

(also remove inline test driver code)

* Migrate doctest for EulerMethod.js

(also remove inline test driver code)

Move manual test-code for plotting stuff in the browser in a distinct file, too. Those "*.manual-test.js" files are excluded from the UpdateDirectory.mjs script, as well.

* Migrate doctest for Mandelbrot.js

(also remove inline test driver code & moved manual drawing test into a *.manual-test.js)

* Migrate doctest for FloodFill.js

* Migrate doctest for KochSnowflake.js

(also move manual drawing test into a *.manual-test.js)

* Update npm lockfile

* Update README and COMMITTING with a few bits & bobs regarding testing & code quality
2021-10-07 12:33:38 +05:30
Roland Hummel
7bb3c80f05 Fix URL creation in directory markdown 2021-10-05 11:23:47 +02:00
Roland Hummel
6fe322bd8a Add npm ci to directory-updating job, as well (so that we can utilize globby) 2021-10-05 11:23:47 +02:00
Roland Hummel
a69d9a8c49 Clean up and speed up UpdateDirectory.js
Uses globby to find all algorithm files. This is way quicker and less error-prone than the previous implementation. Plus, it allows us to fine-tune excludes (e.g. test files and the babel config).

This also removes the need for setTimeouts which greatly speeds up the whole thing.
2021-10-05 11:23:46 +02:00
Roland Hummel
460fd57c6b Test: Drop env.CI 2021-10-05 11:23:46 +02:00
Roland Hummel
f6396f4822 Don't cat the full DIRECTORY.md file in the github job 2021-10-05 11:23:46 +02:00
Roland Hummel
21d4096446 Another proposal: Clean up "update directory" job, as well
relates to ##720

Cleaned up and updated the job description file a bit. Instead of attempting to commit every single time, we check if the DIRECTORY file actually has changes first.
2021-10-05 11:23:46 +02:00
Roland Hummel
6f9b1f127f Proposal: Clean up CI job a bit
relates to #586 and #720

Added npm scripts for doctest and style checking via standard. This allows us to call those directly via npm and not via npx.

The CI job itself is now split into distinct steps (makes it more visible which step failed).
2021-10-05 11:23:45 +02:00
Rak Laptudirm
877ce463c8 chore: add code protection 2021-10-04 12:23:50 +05:30
Rak Laptudirm
cf98deda8e fix: Fixed TODO message
Need to add Doctests to all Algos
2021-05-22 21:20:36 +05:30
Rak Laptudirm
a93abac98d Fixes #539 2021-05-22 21:13:00 +05:30
Christian Clauss
84a4f6bd7a Update nodejs.yml 2021-04-14 23:02:49 +02:00
Christian Clauss
e22405f23b Update nodejs.yml 2021-04-14 22:59:04 +02:00
Christian Clauss
7e0169b260 Cleanup Node.js CI 2021-04-14 22:55:49 +02:00
vinayak
5c17cdb55c Update pull_request_template.md 2020-12-20 23:06:30 +05:30
Christian Clauss
6686ef88b8 Update nodejs.yml 2020-10-31 09:35:01 +01:00
Christian Clauss
c95012865f Update nodejs.yml 2020-10-31 09:27:46 +01:00
Christian Clauss
1f1007a09c Update nodejs.yml 2020-10-31 09:20:12 +01:00
Christian Clauss
9bd5bf8232 npx doctest **/*.js 2020-10-31 09:17:29 +01:00
Christian Clauss
8d527fe1e2 Update nodejs.yml 2020-10-31 09:15:46 +01:00
Christian Clauss
9d21e03790 Update nodejs.yml 2020-10-31 09:10:49 +01:00
Christian Clauss
9bae390f01 Update nodejs.yml 2020-10-31 09:07:09 +01:00
Christian Clauss
3fec0509dd Update nodejs.yml 2020-10-31 08:45:55 +01:00
Christian Clauss
4c8866ec7e npx mocha 2020-10-31 08:36:27 +01:00
Christian Clauss
255ef0dffa npx mocha Maths/test/Abs.test.js 2020-10-31 08:29:28 +01:00