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ツリーの構造(順序)は、その要素が挿入される順序に依存しますか?
そして、ツリーに一意の要素のみが含まれるのか、重複する要素も含まれるのかは、上記の質問の答えにとって重要ですか?
set を検討してください{1, 2}。
{1, 2}
1 を挿入してから 2 を挿入すると、次のようになります。
1 \ 2
2 を挿入してから 1 を挿入すると、次のようになります。
2 / 1
したがって、AA ツリーの構造は、その要素が挿入される順序に依存します。