• Given an AVL-tree anAvlTree and a value aValue, returns a new AVL-tree where this value has been added. This function has no effect if the value is already inside the tree.

    Parameters

    • anAvlTree: AVLTree<any>

      the tree in which to insert

    • aValue: any

      the value considered

    Returns AVLTree<any>

    • a new tree with aValue inserted