12.2-8Prove that no matter what node we start at in a height-h binary  translation - 12.2-8Prove that no matter what node we start at in a height-h binary  Vietnamese how to say

12.2-8Prove that no matter what nod

12.2-8
Prove that no matter what node we start at in a height-h binary search tree, k
successive calls to TREE-SUCCESSOR take O.k C h/ time.
12.2-9
Let T be a binary search tree whose keys are distinct, let x be a leaf node, and let y
be its parent. Show that y:key is either the smallest key in T larger than x:key or
the largest key in T smaller than x:key.
12.3 Insertion and deletion
The operations of insertion and deletion cause the dynamic set represented by a
binary search tree to change. The data structure must be modified to reflect this
change, but in such a way that the binary-search-tree property continues to hold.
As we shall see, modifying the tree to insert a new element is relatively straightforward,
but handling deletion is somewhat more intricate.
Insertion
To insert a new value  into a binary search tree T , we use the procedure TREEINSERT.
The procedure takes a node ´ for which ´:key D , ´:left D NIL,
and ´:right D NIL. It modifies T and some of the attributes of ´ in such a way that
it inserts ´ into an appropriate position in the tree.
TREE-INSERT.T; ´/
1 y D NIL
2 x D T:root
3 while x ¤ NIL
4 y D x
5 if ´:key < x:key
6 x D x:left
7 else x D x:right
8 ´:p D y
9 if y == NIL
10 T:root D ´ // tree T was empty
11 elseif ´:key < y:key
12 y:left D ´
13 else y:right D ´
0/5000
From: -
To: -
Results (Vietnamese) 1: [Copy]
Copied!
12.2-8Prove that no matter what node we start at in a height-h binary search tree, ksuccessive calls to TREE-SUCCESSOR take O.k C h/ time.12.2-9Let T be a binary search tree whose keys are distinct, let x be a leaf node, and let ybe its parent. Show that y:key is either the smallest key in T larger than x:key orthe largest key in T smaller than x:key.12.3 Insertion and deletionThe operations of insertion and deletion cause the dynamic set represented by abinary search tree to change. The data structure must be modified to reflect thischange, but in such a way that the binary-search-tree property continues to hold.As we shall see, modifying the tree to insert a new element is relatively straightforward,but handling deletion is somewhat more intricate.InsertionTo insert a new value  into a binary search tree T , we use the procedure TREEINSERT.The procedure takes a node ´ for which ´:key D , ´:left D NIL,and ´:right D NIL. It modifies T and some of the attributes of ´ in such a way thatit inserts ´ into an appropriate position in the tree.TREE-INSERT.T; ´/1 y D NIL2 x D T:root3 while x ¤ NIL4 y D x5 if ´:key < x:key6 x D x:left7 else x D x:right8 ´:p D y9 if y == NIL10 T:root D ´ // tree T was empty11 elseif ´:key < y:key12 y:left D ´13 else y:right D ´
Being translated, please wait..
Results (Vietnamese) 2:[Copy]
Copied!
12,2-8
Chứng minh rằng không có vấn đề gì, chúng tôi bắt đầu từ nút trong một chiều cao-h cây tìm kiếm nhị phân, k
cuộc gọi liên tiếp để TREE-kế nhiệm chăm Ok C h / lần.
12,2-9
Cho T là một cây tìm kiếm nhị phân mà các phím là khác biệt, cho x là một nút lá, và để cho y
là cha của nó. Hiện y rằng: chính là một trong hai phím nhỏ nhất trong T lớn hơn x: phím hoặc
phím lớn nhất trong T nhỏ hơn x:. Key
12,3 Insertion và xóa
Các hoạt động của chèn và xóa gây tập năng động biểu diễn bởi một
cây tìm kiếm nhị phân để thay đổi. Cấu trúc dữ liệu phải được sửa đổi để phản ánh điều này
thay đổi, nhưng trong một cách mà các tài sản nhị phân tìm kiếm cây vẫn tiếp tục giữ.
Như chúng ta sẽ thấy, việc sửa đổi cây để chèn một nguyên tố mới là tương đối đơn giản,
nhưng xử lý xóa là hơi phức tạp hơn.
Insertion
Để chèn một giá trị mới? thành một cây tìm kiếm nhị phân T, chúng tôi sử dụng các TREEINSERT thủ tục.
Các thủ tục phải mất một nút 'mà': phím D, ': trái D NIL,
và': D đúng NIL. Nó đổi T và một số các thuộc tính của 'theo cách như vậy mà
nó chèn "vào một vị trí thích hợp trong cây.
TREE-INSERT.T; '/
1 y D NIL
2 x DT: root
3 khi x ¤ NIL
4 y D x
5 nếu': phím <x: key
6 x D x: trái
7 khác x D x: đúng
8 ': p D y
9 nếu y == NIL
10 T: root D '// cây T là trống
11 elseif': key <y: key
12 y: trái d
'13 khác y: D đúng'
Being translated, please wait..
 
Other languages
The translation tool support: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese, Chinese Traditional, Corsican, Croatian, Czech, Danish, Detect language, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Odia (Oriya), Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scots Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sundanese, Swahili, Swedish, Tajik, Tamil, Tatar, Telugu, Thai, Turkish, Turkmen, Ukrainian, Urdu, Uyghur, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu, Language translation.

Copyright ©2024 I Love Translation. All reserved.

E-mail: