• Given a tree aTree, returns the height of the tree (i.e the length of a maximal path to a leaf). By convention, the height of a leaf is 1.

    Parameters

    • aTree: TreeI<any>

      the tree to consider

    Returns number

    the height of the tree