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.
* Auto-update DIRECTORY.md
* fix: some redundancy according to standard javascript library
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* 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>