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.
AA 树的结构(顺序)是否取决于插入其元素的顺序?
对于上述问题的答案,树只包含唯一元素还是包含重复元素是否重要?
考虑设置{1, 2}。
{1, 2}
如果你插入 1,然后插入 2,你会得到
1 \ 2
如果你插入 2,然后插入 1,你会得到
2 / 1
因此,AA-tree 的结构取决于其元素的插入顺序。