2012-06-13 4 views
0

빈 스플레이 트리에 삽입 시퀀스가 ​​삽입 된 후 루트에있는 아이템은 다음과 같습니다. 1, 11, 3, 10, 8, 4, 6, 5, 7 , 9, 2? 스플레이 트리의 정의에 따르면스플래쉬 트리 : 루트에있는 아이템

+0

2 루트 될 것입니다 – DonCallisto

+0

마지막 항목이 루트가 될 것입니다. 이것은 스플레이 트리의 주요 속성입니다. 이 게시글보기 http://lowcoupling.com/post/81057347460/binary-search-avl-and-splay-trees – lowcoupling

답변

0

:

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

그래서 난 항상 삽입 된 마지막 요소가 될 것이라고 생각합니다.

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

enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here

I wish,it clears your doubt!!!! 
+0

+1 Splay 트리 다이어그램. –

관련 문제