Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
https://youtu.be/G5QIXywcJlY?t=31m47s
在 31:47,我相信他执行了双重右旋,其中 5 是祖父母,4 是父母,1 是孩子。双右旋后,他有 4 作为 5 的右孩子。
不它不是。他首先执行 RR 支点,使 1 的右侧有 2 和 3。然后他执行相同的 RR 枢轴,但这次 1 有一个右孩子,所以右孩子必须放在某个地方,这样 5-4 才能成为新的右孩子。解决方案是让 5-4 成为新的右孩子,然后将旧的右孩子放在 5 的左边。