卷別
資料結構及演算法
計算國立政治大學 2025 · 考試 · 第 17 題
考科資料結構
Please design an algorithm to search for the -th element in an AVL tree of elements, while the time complexity of insertion operation remains .
(1) (5%) How to modify the data structure of an AVL tree to support this search operation?
(2) (10%) Give the algorithm to search for the k-element.
(3) (5%) How to modify the insertion operation to accommodate for the modification of the data structure.
(Please illustrate your answer by using the AVL-tree provided in Figure 2.)
Figure 2 (AVL tree): root ; left child , right child ; 's children are (left) and (right); 's children are (left) and (right); 's left child is .