Fork me on GitHub

Class comb.collections.BinaryTree


Extends comb.collections.Tree.

A Search tree that maintains the following properties

  • The left subtree of a node contains only nodes with keys less than the node's key.
  • The right subtree of a node contains only nodes with keys greater than the node's key.
  • Both the left and right subtrees must also be binary search trees.
Performance
BestWorst
SpaceO(n)O(n)
SearchO(log n)O(n)
InsertO(log n)O(n)
DeleteO(log n)O(n)

Defined in: BinaryTree.js.
Methods borrowed from class comb.collections.Tree:
clear, contains, every, filter, find, findGreaterThan, findLessThan, forEach, insert, isEmpty, map, print, reduce, reduceRight, remove, some, toArray, traverse, traverseWithCondition
Methods borrowed from class comb.collections.Collection:
concat, indexOf, join, lastIndexOf, slice, toString

Class Detail
comb.collections.BinaryTree()

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 31 2012 16:14:11 GMT-0600 (CST)