Class: Node

j. Node

Constructor

new Node(key, val, left, right)

Represents a BST node.
Parameters:
Name Type Description
key string The lookup key.
val mixed The associated data.
left Node The left subtree.
right Node The right subtree.
Source:

Methods

height() → {Number}

NumberNumberReturns the height of node (i.e. distance from itself to the deepest leaf in the BST)
Source:
Returns:
The height of the node
Type
Number