1329 Commits

Author SHA1 Message Date
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
30779682b9 Conversions algorithms : remove live code & console.log. 2021-10-09 18:15:30 +02:00
ab7e51909a LFUCache/LRUCache : convert live code example to Jest test. 2021-10-09 18:01:42 +02:00
5c4be7604d Remove live code & console.log (Backtracking, Bit-manipulation, Ciphers). 2021-10-09 17:47:03 +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
97724cc937 Merge branch 'TheAlgorithms:master' into issues/720 2021-10-09 14:52:17 +02:00
5624fa61a6 Merge branch 'issues/720' of https://github.com/lvlte/Javascript into issues/720 2021-10-09 14:31:37 +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
51897ca984 Auto-update DIRECTORY.md 2021-10-09 12:08:10 +00: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
2edbc23730 Comply with ESM syntax. Remove unnecessary import. 2021-10-09 13:37:33 +02:00
3f32320c85 Comply with ESM. Convert live code example to Jest test. 2021-10-09 13:25:34 +02:00
cbe7e0c89f Comply with ESM syntax. 2021-10-09 13:18:40 +02:00
5f601fac8d chore: Merge pull request #764 from lvlte/fixes
PR#759 - Fix test/build script and comply with JS standard styles.
2021-10-09 16:34:11 +05:30
8812f63ba2 Small fixes + comply with JS standard styles. 2021-10-09 12:23:49 +02:00
5a290c3ae5 chore: Merge pull request #759 from Aayushi-Mittal/powerOf2
Add code for checking whether given number is a power of 2 or not
2021-10-08 21:34:19 +05:30
3d8a577881 Auto-update DIRECTORY.md 2021-10-08 15:51:56 +00:00
7ce688b9db Updated the code and did the required changes 2021-10-08 21:20:21 +05:30
46d6855771 chore: Merge pull request #745 from lvlte/ProjectEuler/016
Project Euler - Problem 16
2021-10-08 17:38:55 +05:30
572a9b1a33 chore: Merge pull request #747 from lvlte/ProjectEuler/020
Project Euler - Problem 20 (fix + test)
2021-10-08 17:36:48 +05:30
2c273ba662 Use ESM syntax and remove console.log() 2021-10-08 13:26:10 +02:00
52de039184 Use ESM syntax and remove console.log() 2021-10-08 13:21:01 +02:00
e978f4365d Add code and tests for checking power of 2 2021-10-08 15:41:45 +05:30
cbf28a7bb2 Auto-update DIRECTORY.md 2021-10-08 08:01:21 +00:00
a83168c450 chore: Merge pull request #756 from nibble-4bits/algorithm/bufferToBase64
Create algorithm for converting binary data to base64
2021-10-08 13:30:50 +05:30
fc0647eec6 Auto-update DIRECTORY.md 2021-10-08 08:00:19 +00:00
017068480c chore: Merge pull request #757 from nibble-4bits/algorithm/base64ToBuffer
Create algorithm for converting base64 to binary data
2021-10-08 13:29:46 +05:30
d6193f6a8a Create algorithm for converting base64 to binary data 2021-10-08 00:51:04 -05:00
5d56140699 Add comment linking to base64 article in Wikipedia 2021-10-08 00:22:10 -05:00
281c675d63 Create algorithm for converting binary data to base64 2021-10-08 00:19:00 -05:00
2ae093b97c Auto-update DIRECTORY.md 2021-10-07 07:41:27 +00:00
124d2010f0 chore: merge Added Temperature Conversions to Javascript (#705)
* Added Temperature Conversions to Javascript

I added a file which contains essential conversions needed to swap temperature units to one another.
Hope you like it :)

* Update Conversions/TemperatureConversion.js

Suggestions saved

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

* Added test file 

"test" folder was created and tests required for "TemperatureConversions" was added to it

* Fixed minor syntax errors

* Update Conversions/test/TemperatureConversion.test.js

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

* Formatted TemperatureConversion.js 

The code was modified to comply with rules and styes recommended by the repository

* Formatted TemperatureConversion.test.js 

The code was modified to comply with rules and styes recommended by the repository

* Reformatted :) 

Hope this passes the test :)

Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
2021-10-07 13:10:54 +05:30
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
6eeb989930 chore: Merge pull request #750 from thisabhijeet/kadanes
added documentation, js standard style and jest testing to kadane algorithm file.
2021-10-06 17:57:29 +05:30
7c9219d4fd chore: Merge pull request #738 from charliejmoore/cycle-sort-tests
Cycle sort tests
2021-10-06 17:48:00 +05:30
ee54c7176a Auto-update DIRECTORY.md 2021-10-06 11:45:15 +00:00
586aa929c8 Fix merge conflicts 2021-10-06 07:44:41 -04:00
83b840d691 Merge branch 'master' of github.com:charliejmoore/Javascript into cycle-sort-tests 2021-10-06 07:42:16 -04:00
134641443b Merge branch 'master' of github.com:charliejmoore/Javascript into cycle-sort-tests 2021-10-06 07:41:35 -04:00
ed49e122a7 tried to fix tests 2021-10-06 15:34:08 +05:30
5a59d1efc0 changes made 2021-10-06 15:02:37 +05:30
c0fa1401c8 Merge branch 'kadanes' of https://github.com/thisabhijeet/Javascript into kadanes 2021-10-06 14:45:56 +05:30
3a8e336262 added documentation, js standard style and jest testing to kadane algorithm file. 2021-10-06 14:45:07 +05:30
6607f279ca Auto-update DIRECTORY.md 2021-10-06 09:10:09 +00: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
2e6f8ae982 chore: Merge pull request #736 from charliejmoore/bucket-sort-tests
Bucket sort tests
2021-10-06 12:45:35 +05:30
7e419f02db chore: Merge pull request #726 from ahamed/master
 add an algorithm for checking a year is a leap year or not.
2021-10-06 12:34:22 +05:30