0

空のスプレイ ツリーに 1、11、3、10、8、4、6、5、7、9、2 の順に挿入した後のルートにあるアイテムはどれですか?

4

2 に答える 2

1
This is How the Splay tree looks after inserting each element.
Each frame shows the splay tree after ith element is inserted.

ここに画像の説明を入力 ここに画像の説明を入力 ここに画像の説明を入力 ここに画像の説明を入力 ここに画像の説明を入力 ここに画像の説明を入力 ここに画像の説明を入力 ここに画像の説明を入力 ここに画像の説明を入力 ここに画像の説明を入力

I wish,it clears your doubt!!!!
于 2012-07-11T19:30:24.843 に答える
0

スプレイ ツリーの定義によると、次のようになります。

Splaying the tree for a certain element rearranges the tree so that the element is placed at the root of the tree.

したがって、常に最後に挿入される要素になると思います。

于 2012-06-13T13:04:50.033 に答える