1611 Commits

Author SHA1 Message Date
59760f75c4 merge: Add test case to Edit Distance Algorithm (#1044)
* Add test case to Edit Distance Algorithm

* Updated Documentation in README.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-06-12 20:14:11 +05:30
f5be6b2daa merge: Add test case to Fibonacci Search Algorithm (#1042)
* Add test case to Fibonacci Search Algorithm

* Updated Documentation in README.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-06-11 17:13:12 +05:30
15c20968ae merge: Add test case to jump search Algorithm (#1041)
* Add test case to jump search Algorithm

* Updated Documentation in README.md

* Remove commented code

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-06-10 20:32:47 +05:30
398b6822dc merge: Add test case to the Exponential Search Algorithm (#1040)
* Add test case to the Exponential Search Algorithm

* Updated Documentation in README.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-06-07 21:13:03 +05:30
d3cec8b28f merge: Rename secondLargestElement.test.js to SecondLargestElement.test.js (#1039) 2022-06-06 14:02:12 +05:30
c105c4d0a2 merge: Rename pigeonHoleSort.test.js to PigeonHoleSort.test.js (#1038) 2022-06-05 22:29:06 +05:30
61ee22459b merge: Add test case to Find Second Largest Element Algorithm (#1037) 2022-06-05 08:51:58 +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
0dccd280f3 merge: fix typo(change file name) (#1034) 2022-06-02 12:03:04 +05:30
d59213d0b8 merge: Add test case to CheckPascalCase Algorithm (#1029) 2022-05-31 14:25:31 +05:30
162e90f3d2 merge: Add test case to palindromeRearranging Algorithm (#1030)
* Add test case to CheckPascalCase Algorithm

* Add test case to palindromeRearranging Algorithm

* no need
2022-05-31 14:24:57 +05:30
07e77fac1c merge: Add testcase to AlternativeStringArrange Algorithm (#1026)
* Add test case to HexToRGB algorithm

* Add testcase to AlternativeStringArrange Algorithm

* deleting coppy file
2022-05-30 19:50:04 +05:30
9befd923b1 Add testcase to checkKebabCase (#1027) 2022-05-30 16:18:42 +02:00
92a81a2290 merge: Add Twin Primes algorithm (#1024)
* Create TwinPrime.js

* Update TwinPrime.js

* Create TwinPrime.test.js

* Update TwinPrime.js

* Update TwinPrime.js

* Add suggestions

* Update TwinPrime.test.js

* Update TwinPrime.js

* Styling
2022-05-27 21:28:45 +05:30
0357a23282 merge: Add the Collatz Conjecture (#1022)
* Create CollatzConjecture.js

* Create CollatzConjecture.test.js

* Update CollatzConjecture.js

* Update CollatzConjecture.test.js

* Rename CollatzConjecture.js to CollatzSequence.js

* Update and rename CollatzConjecture.test.js to CollatzSequence.test.js

* Update CollatzSequence.js

* Update CollatzSequence.test.js

* Update CollatzSequence.test.js

* Fix styling errors

* Add suggestion

Co-authored-by: Rak Laptudirm <rak@laptudirm.com>

* Update CollatzSequence.js

* Update CollatzSequence.js

* Update comments to match the Collatz Sequence

* Update CollatzSequence.test.js

Co-authored-by: Rak Laptudirm <rak@laptudirm.com>
2022-05-26 08:37:53 +05:30
dc67506272 merge: Add pronic number implementation (#1023)
* feat: Add pronic number implementation

* Add test to Math

* Minor fixes

* Minor style fixes

* refactor: Store square root in a variable

* Minor refactoring

* fix: Change pronic number check logic

Reduced time complexity from O(sqrt(n)) to O(1)

* Minor style fixes

* fix: Update pronic number check boolean equation

* refactor: Change pronic number check condition

* refactor: Add tests to Math

* Minor style fixes

* refactor: Change unit test logic
2022-05-25 17:39:23 +05:30
d28ae8b1f7 merge: Update test case for bubbleSort ( with code style is fixed) (#1020)
* Update test case for bubbleSort

* re-update test case for bubble sort

* re-update test case for bubbleSort
2022-05-23 22:27:11 +05:30
360c447e72 merge: Add test case to HexToRGB algorithm (#1018) 2022-05-17 19:29:42 +05:30
4cd6fd4f1b merge: Add test case to Vigenere Cipher Algorithm (#1017) 2022-05-17 16:58:00 +05:30
c865654f27 Clean up phone number formatting (#1015) 2022-05-16 18:48:16 +02:00
f736217341 merge: Add test case to KeywordShiftedAlphabet algorithm (#1013) 2022-05-12 21:22:30 +05:30
21a851176d merge: Find max recursion (#1010)
* add yt video association algorithm

* Implement FindMaxRecursion in JS

* Delete file in other PR

* Fix requested changes

* Add requested changes

* Delete YoutubeVideoAssociation.test.js

* Deduplicate comment

* Remove trailing spaces

Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2022-05-09 15:05:16 +05:30
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 489544da0a3d479910fbea020d3be3d0d10681bf.

* 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
e05b4432d8 merge: Improved the complexity of dequeue O(n) to O(1) (#1005)
* 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 489544da0a3d479910fbea020d3be3d0d10681bf.

* remove: yarn lock

* chore: fix grammer

* feat: used replace method & added test case

* feat: remove revert

* chore: added new line

* feat: updated the Queue array to linkedlist DS

* chore: fixed grammer

* resolve: removed capacity related codes, & updated test cases

* feat: added length dicrease code on dequeue
2022-05-06 21:50:55 +05:30
03d0b1e0b8 merge: Update README.md (#1004) 2022-05-06 15:51:56 +05:30
edd7076e75 merge: A better README (#1003)
* feat: a better README

* chore: update repositories link

* chore: fix broken links

* chore: use gfm `<hr>` syntax

Replaced <hr> with ---, which is GitHub Flavoured Markdown syntax.

* chore: align everything to be centered

* feat: use same style for all badges

* chore: use shields.io badge instead of github

* chore: reorder badges and add comments

* chore: edit and format body

* chore: add redirect links to all images

* typo: JavasScript -> JavaScript
2022-05-06 13:46:34 +05:30
b81c339b59 merge: Improve pull request template (#1002) 2022-05-04 22:32:08 +05:30
28062533b6 merge: Upgrade max char (#983)
* 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 489544da0a3d479910fbea020d3be3d0d10681bf.

* remove: yarn lock

* chore: fix grammer

* feat: used replace method & added test case

* feat: remove revert

* chore: added new line

* feat: added filter for alphabets only

* resolve: added empty validation improved ignore pattern

* chore: reverted to for of loop
2022-05-02 14:51:16 +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
01db0fb369 Fix wiggle sort (#991)
Co-authored-by: Antonia Strack <antonia.strack@thm.mni.de>
2022-04-28 12:16:13 +02:00
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
2e18fbb39a merge: Add the Stooge Sort Algorithm (#998)
* Add stooge sort sorting algorithm with included tests

* Add stooge sort sorting algorithm with included tests

* Add correct url for more information

* Add time complexity warning
2022-04-28 13:47:23 +05:30
5641b6faea Add Zeller's Congruence Algorithm in Math (#996) 2022-04-27 14:49:12 +02:00
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
c81db629b8 merge: EuclidGCD: add tests (#994)
test was not present beforehand.
2022-04-22 16:21:22 +05:30
9513bcd77a merge: WhileLoopFactorial: Optimize and add tests (#992)
* Optimised the factorial function.

There was previously an unnecessary check for if the number was 0 or 1.

* Create WhileLoopFactorial.test.js

The test was not present previously.

* result *= num

* Update WhileLoopFactorial.test.js

* testFactorial function

* Space for formatting.

* should fix the formatting issues. I was having trouble with npx standard, so I just used the online verifier at https://standardjs.com/demo.html
2022-04-21 21:58:29 +05:30
1e0dd1c44f chore: add appgurueu to CODEOWNERS 2022-04-21 11:40:49 +05:30
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
298ab3366c merge: Add proper tests for binary search (#987)
* feat: added alternative binary search

* fix: exchange "dir" for "high"

* fix : fixing code style

* fix: fixed readability

* fix: fixed code smells

* fix: remove binary search alternative

* feat: added tests of binary search interative and recursive

* fix: fixed wrong identation

* fix: refactoring duplicated code of tests
2022-04-21 11:37:20 +05:30
8fc53906e6 merge: FindLCM: Improve code readablility (#985)
* fix: improving code readability

* fix: exchange break to return lcm

* fix: fixing condition for improve readability
2022-04-20 21:29:29 +05:30
40989326f1 Change 1 week to 2 weeks for stale issues 2022-04-17 20:14:59 -05:00
48e3e8d8c9 chore: use stale label to mark something as stale 2022-04-16 21:26:08 +05:30
74857b7a9e merge: Improvement on singly circular linkedList (#981)
* Auto-update DIRECTORY.md

* Update and rename SingleCircularLinkedList.js.js to SinglyCircularLinkedList.js

* Test Case creation for SinglyCircularLinkedList

* Update SinglyCircularLinkedList.js

* Update SinglyCircularLinkedList.test.js

* Update SinglyCircularLinkedList.js

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-04-10 15:36:48 +05:30
dfe200a957 merge: Improving coding standard of singly linked list (#980)
* Auto-update DIRECTORY.md

* Changes on SinglyLinkedList

* Spelling change

* Added comment for initiateNodeAndIndex()

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-04-09 12:26:22 +05:30
35035f7afa merge: Add test case and fix TimSort algo (#977) 2022-04-03 16:28:36 +05:30
2169e17d47 merge: Add test case to shellSort algorithm (#975) 2022-04-03 16:27:56 +05:30
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
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
6f33f990f2 merge: Add test case and fix pigeonHoleSort Algorithm (#967) 2022-04-01 12:28:43 +05:30
871a49f3cd merge: test case to radixSort Algorithm (#968) 2022-04-01 12:28:12 +05:30