...点不超过两个 树的开始位置是一个独特的起始节点称为树根 (root) 节点左边的子节点(如果存在)称为它的左子节点(left child) 节点右边的子节点(如果存在)称为它的右子节点(right child) 如果树中的某一节点没有任何子节点,这个节点称为一个叶节点(l...
基于28个网页-相关网页
必须要确保,如果做右旋,顶端节点必须有一个左子节点。
You must be sure that, if you're doing a right rotation, the top node has a left child.
换句话说,就是一个有右子节点的节点的可能接左子节点的位置,或者是有左子节点的节点的可能接右子节点位置。
In other words, it's the potential left child of a node with a right child, or the potential right child of a node with a left child. This will make more sense as we go along.
而子节点也是这样一个节点,也有一个左节点和一个右节点,当然也可以没有子节点,也就是说一个节点可能有零个或者两个子节点。
Each child is itself a node, and either or both of the child nodes can be null, meaning that a node may have zero to two children.
应用推荐