二叉搜索树
_Gray
这个作者很懒,什么都没留下…
展开
-
1135 Is It A Red-Black Tree (30 分)
There is a kind of balanced binary search tree named red-black tree in the data structure. It has the following 5 properties: (1) Every node is either red or black. (2) The root is black. (3) Every...原创 2019-01-23 21:00:54 · 199 阅读 · 1 评论 -
1123 Is It a Complete AVL Tree (30 分)
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is...原创 2019-01-21 21:57:39 · 164 阅读 · 0 评论 -
1115 Counting Nodes in a BST (30 分)
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nodes with keys less than or equal to the node's key. ...原创 2019-01-16 21:46:41 · 106 阅读 · 0 评论