• Given a value aVal and two AVL-trees aLeftChild and aRightChild, returns an AVL-tree whose root is labeled by aVal and with both trees as its children.

    Parameters

    • aVal: any

      a value at the root of the tree

    • aLeftAvlTree: AVLTree<any>

      a left child

    • aRightAvlTree: AVLTree<any>

      a right child

    Returns AVLTree<any>

    • if the left or right arguments are not AVL-trees