Describe the bug
Tests showed that the height difference in the AVL Tree did not remain at 1 after inserting a large amount of data. This indicates a flawed AVL Tree.
To Reproduce
const { AVLTree, RedBlackTree } = require('data-structure-typed');
const { getRandomIntArray } = require('../utils/array');
const MILLION = 1000000;
const randomArray = getRandomIntArray(MILLION, 0, MILLION - 1, false);
const avlTree = new AVLTree();
for (let i = 0; i < randomArray.length; i++)
avlTree.add(randomArray[i]);
console.log(avlTree.getHeight() - avlTree.getMinHeight());