Class Tree<T>

TreeNode

TreeNode

Type Parameters

  • T

Constructors

Properties

Accessors

Methods

Constructors

Properties

data: T
left: PTreeNode<T>
right: PTreeNode<T>

Accessors

  • get height(): number
  • Returns the height of the tree. Call only when this is the root.

    Returns number

Methods