88 Commits

Author SHA1 Message Date
df4a783b06 Complying with JavaScript Standard Style (npx standard --fix). 2021-10-11 15:49:24 +02:00
036ac907ae Graph2.js : Convert live test into Jest test. 2021-10-11 14:23:24 +02:00
e18718b7d5 Remove live code & console.log, leave examples as comments. 2021-10-11 14:07:10 +02:00
449ef45193 Data Structure : Convert live test to Jest test. Remove live code & console.log 2021-10-10 16:25:41 +02:00
a3d44ad3e1 Data Structure : remove live code & console.log 2021-10-10 16:11:06 +02:00
cbe7e0c89f Comply with ESM syntax. 2021-10-09 13:18:40 +02:00
95b75e81d3 chore: merge Fix/742 migrate doctest for Vector2.js (#752)
* Migrate doctest for Vector2.js

* Remove eslint disabling for no-unused-vars since now the class is exported at the end of the file

* Group all related tests to own jest describe blocks

* Improve the doc-comment by fixing it's formatting
2021-10-07 12:39:06 +05:30
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
e27bc0a702 resolved conflicts 2021-10-05 14:05:11 +05:30
1c22f65ce7 fixed the issue in Trie file and typo in sudoku 2021-10-05 12:53:38 +05:30
1589263947 fixed some spellings 2021-10-05 12:49:23 +05:30
f071220c3e chore: merged "Quick select tests" (#697)
* add link to function description

* fix formatting for consistency

* export function so it can be imported for testing

* throw error on invalid input

* add tests for QuickSelect.js

* remove unnecessary comment

* Update Data-Structures/Array/QuickSelect.js

Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>

Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
2021-09-27 21:44:11 +05:30
8c7d592191 chore: merge "removeValue method implemented to remove a particular node from the BST #687" (#696)
* removeValue method of BST implemented #687

* code has formatted for the file BinarySearchTree.js
2021-09-27 11:02:10 +05:30
00d110fc98 Add doctest on quickselect algorithm 2021-06-09 17:15:58 +06:00
e0eb0631f4 Merge pull request #371 from Sandeepan-Das/add-CircularQueue
Add Circular Queue
2021-05-23 12:58:38 +05:30
ca4c1a62af style: Fixed most styles (according to standardjs) 2021-05-21 11:16:11 +05:30
625296b5bc Add Vector2 (#593)
* add Vector2.js
* Rename Data-Structures/Vector2.js to Data-Structures/Vectors/Vector2.js
2021-04-30 01:27:11 +12:00
4df41124f8 Merge pull request #536 from Lakhan-Nad/AVLTree
AVL Tree Added in JS Fixes:#535
2021-01-17 09:38:48 +05:30
e62844f7d2 Update Queue.js 2020-10-31 12:03:11 +05:30
c117885246 AVL Tree Added in JS Fixes:#535 2020-10-30 22:52:16 +05:30
34a8b7065a change from ES5 to ES6 2020-10-27 02:59:07 +06:00
c6b95c29e2 Merge pull request #426 from pomkarnath98/rotate-list-right
Added Rotate List Right by k places to the list
2020-10-10 13:02:44 +05:30
35cade3908 Changed Styles as per guidelines 2020-10-06 15:14:39 +05:30
da21e7d326 Added Rotate List Right by k places to the list 2020-10-06 15:09:33 +05:30
b6710baccc add new data structures (Single Circular Linked List) (#400)
* add new data structures (Single Circular Linked List)

* fix standard

* fix standard js

* fix code standard
2020-10-06 12:19:50 +05:30
3ab272da4b Style Changed 2020-10-05 00:00:45 +05:30
e31390f0a0 Added Dummy head to avoid Undefined Error 2020-10-04 23:55:40 +05:30
48c7bab832 Added Cycle Detection Problem in Linkedlist 2020-10-04 23:44:17 +05:30
76a82e293a Add Circular Queue 2020-10-02 22:15:29 +05:30
f9bac45d54 Trie Added in JS (#296)
* Trie Added in JS

* Standard Fixed

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-01 23:34:22 +05:30
e061178174 new stack implementation (ES6) fixes: #{246} (#247)
* new stack implementation (ES6) fixes: #{246}

* Update Data-Structures/Stack/StackES6.js

Co-authored-by: Tapajyoti Bose <44058757+ruppysuppy@users.noreply.github.com>

* Update StackES6.js

Co-authored-by: vinayak <itssvinayak@gmail.com>
Co-authored-by: Tapajyoti Bose <44058757+ruppysuppy@users.noreply.github.com>
2020-08-21 00:25:17 +05:30
8a9ea57f01 fixed issue with delete operator on stacks (#218)
* fixed issue with delete operator 

using delete operator in arrays ,element remains undefined. so splice is the clean way to do that

* Fixed the semicolon and let errors

* Update Stack.js
2020-07-24 09:38:56 +05:30
b2f6471b89 feat: adjust swap grammar (#175)
* feat: adjust swap grammar

* fix: grammar
2020-05-23 11:31:41 +05:30
9000e1caaa Re-orgainze files and folders in the repository (#172)
* Re-orgainze files and folders in the repository

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-18 11:10:07 +05:30
cb0aff9ec2 Add Graph BFS algorithm (#169)
* Add Graph BFS algorithm

* updating DIRECTORY.md

* Fix failing tests

* updating DIRECTORY.md

* Fix further failing tests

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-18 10:15:53 +05:30
728363024a Max heap implementation (#157)
* Added MaxHeap implementation

* Added MaxHeap implementation

* Added MaxHeap implementation

* Added MaxHeap implementation

* Delete package-lock.json

* Delete .gitignore
2020-05-08 04:21:27 +05:30
7ff6b8716f editing file names 2020-05-06 21:07:49 +05:30
75f6888019 Javascript/Math: editing file name 2020-05-06 18:30:19 +05:30