The push method observes the current top node, constructs a new node to be pushed on the stack, and then, if the topmost node has not changed since the initial observation, installs the new node.
push方法观察当前最顶的节点,构建一个新节点放在堆栈上,然后,如果最顶端的节点在初始观察之后没有变化,那么就安装新节点。
You must be sure that, if you're doing a right rotation, the top node has a left child.
必须要确保,如果做右旋,顶端节点必须有一个左子节点。
You must be sure that, if you're doing a right rotation, the top node has a left child.
必须要确保,如果做右旋,顶端节点必须有一个左子节点。
应用推荐