This page let's the user build and edit their own binary search tree data structure. The binary search tree is a data structure in which each left child node must have a value less than its parent, and each right child node's value must be greater than that of its parent.
Several functions are available to the user to change the tree. The user can add a specific value selected in the input field, or add a randomly generated number between -100 to 100. In both cases, a function will travel through the tree checking values and the new node will automatically be added to the correct spot. The user can also delete specific values from the tree, and the tree will autmomatically restructured without the deleted node. The user is also able to trigger a search function which gives the user info about the node traversals necessary while searching the tree. The user also has the option to balance the tree, which uses AVL tree rotations in order to decrease the depth of the tree. Trees can be searched more efficiently when each level of the tree is full, the balancing function checks the child branches of each node for imbalances and, if it finds a difference of two or greater between the branches, performs a rotation to balance the tree. After each function, the 'Average Node Accesses' value is updated, giving the user info about how easily the tree can be searched.