Medusa\Tree\BinaryTree::height PHP Method

height() public method

public height ( )
    public function height();

Usage Example

 public function __construct($key, $value, BinaryTree $left, BinaryTree $right)
 {
     $this->key = $key;
     $this->value = $value;
     $this->left = $left;
     $this->right = $right;
     $this->height = 1 + max($left->height(), $right->height());
 }