【圖解】紅黑樹的操作和源代碼

Node(4000) and parent Node(3000) are both red。 RotateLeft(4000):以Node(4000)爲支點,左旋 public void leftRotate(TreeNode x) {     TreeNode y = x.right;     x.right = y.left;     if(y.left != this.NIL) {    
相關文章
相關標籤/搜索