Figure 12.1 Binary search trees. For any node x, the keys in the left  translation - Figure 12.1 Binary search trees. For any node x, the keys in the left  Vietnamese how to say

Figure 12.1 Binary search trees. Fo

Figure 12.1 Binary search trees. For any node x, the keys in the left subtree of x are at most x:key,
and the keys in the right subtree of x are at least x:key. Different binary search trees can represent
the same set of values. The worst-case running time for most search-tree operations is proportional
to the height of the tree. (a) A binary search tree on 6 nodes with height 2. (b) A less efficient binary
search tree with height 4 that contains the same keys.
its right child, and its parent, respectively. If a child or the parent is missing, the
appropriate attribute contains the value NIL. The root node is the only node in the
tree whose parent is NIL.
The keys in a binary search tree are always stored in such a way as to satisfy the
binary-search-tree property:
Let x be a node in a binary search tree. If y is a node in the left subtree
of x, then y:key  x:key. If y is a node in the right subtree of x, then
y:key  x:key.
Thus, in Figure 12.1(a), the key of the root is 6, the keys 2, 5, and 5 in its left
subtree are no larger than 6, and the keys 7 and 8 in its right subtree are no smaller
than 6. The same property holds for every node in the tree. For example, the key 5
in the root’s left child is no smaller than the key 2 in that node’s left subtree and no
larger than the key 5 in the right subtree.
The binary-search-tree property allows us to print out all the keys in a binary
search tree in sorted order by a simple recursive algorithm, called an inorder tree
walk. This algorithm is so named because it prints the key of the root of a subtree
between printing the values in its left subtree and printing those in its right subtree.
(Similarly, a preorder tree walk prints the root before the values in either subtree,
and a postorder tree walk prints the root after the values in its subtrees.) To use
the following procedure to print all the elements in a binary search tree T , we call
INORDER-TREE-WALK.T:root/.
0/5000
From: -
To: -
Results (Vietnamese) 1: [Copy]
Copied!
Figure 12.1 Binary search trees. For any node x, the keys in the left subtree of x are at most x:key,and the keys in the right subtree of x are at least x:key. Different binary search trees can representthe same set of values. The worst-case running time for most search-tree operations is proportionalto the height of the tree. (a) A binary search tree on 6 nodes with height 2. (b) A less efficient binarysearch tree with height 4 that contains the same keys.its right child, and its parent, respectively. If a child or the parent is missing, theappropriate attribute contains the value NIL. The root node is the only node in thetree whose parent is NIL.The keys in a binary search tree are always stored in such a way as to satisfy thebinary-search-tree property:Let x be a node in a binary search tree. If y is a node in the left subtreeof x, then y:key  x:key. If y is a node in the right subtree of x, theny:key  x:key.Thus, in Figure 12.1(a), the key of the root is 6, the keys 2, 5, and 5 in its leftsubtree are no larger than 6, and the keys 7 and 8 in its right subtree are no smallerthan 6. The same property holds for every node in the tree. For example, the key 5in the root’s left child is no smaller than the key 2 in that node’s left subtree and nolarger than the key 5 in the right subtree.The binary-search-tree property allows us to print out all the keys in a binarysearch tree in sorted order by a simple recursive algorithm, called an inorder treewalk. This algorithm is so named because it prints the key of the root of a subtreebetween printing the values in its left subtree and printing those in its right subtree.(Similarly, a preorder tree walk prints the root before the values in either subtree,and a postorder tree walk prints the root after the values in its subtrees.) To usethe following procedure to print all the elements in a binary search tree T , we callINORDER-TREE-WALK.T:root/.
Being translated, please wait..
Results (Vietnamese) 2:[Copy]
Copied!
Hình 12.1 cây tìm kiếm nhị phân. Đối với bất kỳ nút x, các phím trong cây con trái của x là tại hầu hết các x: chủ chốt,
và các phím trong cây con phải của x là ít nhất x: key. Cây tìm kiếm nhị phân khác nhau có thể đại diện cho
cùng một tập hợp các giá trị. Các trường hợp xấu nhất chạy thời gian cho hầu hết các hoạt động tìm kiếm cây là tỷ lệ thuận
với chiều cao của cây. (a) Một cây tìm kiếm nhị phân trên 6 nút với chiều cao 2. (b) Một nhị phân kém hiệu quả
cây tìm kiếm với chiều cao 4 có chứa các phím tương tự.
con phải của nó, và mẹ của nó, tương ứng. Nếu một đứa trẻ hoặc cha mẹ là mất tích, các
thuộc tính thích hợp chứa các giá trị NIL. Nút gốc là nút duy nhất trong
cây mà cha mẹ là NIL.
Các phím trong một cây tìm kiếm nhị phân luôn được lưu trữ trong một cách nào đó để thỏa mãn
sở nhị phân tìm kiếm cây:
Cho x là một nút trong cây tìm kiếm nhị phân . Nếu y là một nút trong cây con trái
của x, sau đó y: key? x: key. Nếu y là một nút trong cây con phải của x, sau đó
y: key? x:. key
Như vậy, trong hình 12.1 (a), chìa khóa của gốc là 6, các phím 2, 5, và 5 trong trái của
cây con không được lớn hơn 6, và các phím 7 và 8 trong cây con phải của nó là không nhỏ
hơn 6. Các tài sản cũng tương tự cho tất cả các nút trong cây. Ví dụ, phím 5
trong con trái của gốc là không nhỏ hơn phím 2 trong cây con trái của nút đó và không
lớn hơn so với các phím 5 trong cây con phải.
Thuộc tính nhị phân tìm kiếm cây cho phép chúng ta in ra tất cả các phím trong một số nhị phân
cây tìm kiếm trong thứ tự sắp xếp bởi một thuật toán đệ quy đơn giản, được gọi là một cây inorder
đi bộ. Thuật toán này được đặt tên như vậy bởi vì nó in chìa khóa của gốc rễ của một cây con
giữa in các giá trị trong cây con trái của nó và in ấn những người trong cây con phải của nó.
(Tương tự như vậy, một đi bộ cây preorder in gốc trước khi các giá trị trong một trong hai cây con,
và . dạo cây postorder in gốc sau khi các giá trị trong cây con của nó) Để sử dụng
các thủ tục sau đây để in tất cả các yếu tố trong một cây tìm kiếm nhị phân T, chúng tôi gọi
inorder-TREE-WALK.T: root /.
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: