from: http://en.wikipedia.org/wiki/Binary_search_tree
http://zh.wikipedia.org/wiki/二元搜索树
Binary search tree
From Wikipedia, the free encyclopedia
Binary Search Tree
Type
Tree
Time complexity
in big O notation
Average
Worst case
Space
O(n)
O(n)
Search
O(log n)
O(n)
Insert
O(log n)
O(n)
Delete
O(log n)
O(n)
A binary search tree of size 9 and depth 3, with root 8 and leaves 1, 4, 7 and 13
In computer science, a binary
search tree (BST), which may ......
阅读全文