計概 AVL tree - 考試

Table of Contents

26 下列那個樹狀結構不適合用於排序(sorting)? (A) 最大堆積(max heap) (B) 最
小堆積(min heap) (C) 二元搜尋樹(binary search tree) (D) AVL tree

ans:(D)

是因為插入刪除時 需要大量rotation的原因嗎@@

感謝大大們解惑~~

--

All Comments

Necoo avatarNecoo2013-03-28
AVL只是平衡概念跟裡面的數值無關
Ivy avatarIvy2013-03-29
我覺得應該是要從時間複雜度的角度去思考
Franklin avatarFranklin2013-04-01
AVL TREE也是一種BST 也可以利用中序追蹤來達到排序功能
Donna avatarDonna2013-04-05
這題真奇怪 排序的時間複雜度都O(nlogn)呀
轉去研所考題版問問
Emily avatarEmily2013-04-06
建BST跟AVL都花O(nlogn) inorder=O(n), total=O(nlogn)