22 Commits

Author SHA1 Message Date
1d252d7aca feat: add tests for binary search trees (#1769) 2025-01-15 16:41:02 +05:30
6fe21d21e9 chore: convert functions to an ES2015 classes (#1656)
* chore: convert functions to an ES2015 classes

* remove unnecessary functions
2024-04-13 23:21:54 +05:30
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
00e40e6f06 Fix/code smells (#1338)
* ♻️ refactor: improving and fixing some code

* Updated Documentation in README.md

* ♻️ refactor: improving isLeapYear

* 🐛 chore: back changes

* 🐛 fix: using reduce instead forEach

* 🐛 fix: using reduce instead forEach

* 🐛 fix: removing duplicated code

* 🐛 chore: removing .js

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-21 23:36:43 +05:30
002b10a5aa docs: fix typos (#1283)
* docs: fix typos

* fix
2023-02-07 22:20:28 +05:30
58671861a5 algorithm: SegmentTree (#1178) 2022-10-20 17:09:37 +05:30
e7ee09a07d feat: AVLTree 100% test coverage (#1098) 2022-09-13 14:45:20 +05:30
a133529122 merge: Bugfix AVLTree comparator (#1084)
The original insertBalance function was doing raw value comparisons as opposed to using the tree's comparator. This is clearly unintentional, and would (ultimately) cause the structure to segfault when constructed with the stringData included in the updated test.

I've added the fix, scanned the rest of the code for similar issues, and added the appropriate test case which passes successfully with the fix. The jest code coverage increases slightly as well with the changes.
2022-08-15 21:57:31 +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
c9701e8a4c merge: Improving the coding standard for AvLTree Data Structure (#882)
* Improving the coding standard for AvLTree Data Structure

* Test case creation for AVLTree

~ Created test cases for AVL Tree
~ Indentation fix for AVLTree.js

* Auto-update DIRECTORY.md

* Change in logic for data list

* Style fix based on standard.js

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-02-17 14:08:26 +05:30
df4a783b06 Complying with JavaScript Standard Style (npx standard --fix). 2021-10-11 15:49:24 +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
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
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
ca4c1a62af style: Fixed most styles (according to standardjs) 2021-05-21 11:16:11 +05:30
c117885246 AVL Tree Added in JS Fixes:#535 2020-10-30 22:52:16 +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
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