• Given a binary tree aBinaryTree, returns a boolean telling if the tree is a leaf or not (i.e if it has no children).

    Parameters

    • aBinaryTree: Tree<any>

      the tree to consider

    Returns boolean

    is the tree has no children