看板 Examination 關於我們 聯絡資訊
26 下列那個樹狀結構不適合用於排序(sorting)? (A) 最大堆積(max heap) (B) 最 小堆積(min heap) (C) 二元搜尋樹(binary search tree) (D) AVL tree ans:(D) 是因為插入刪除時 需要大量rotation的原因嗎@@ 感謝大大們解惑~~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.195.194.244
leiyan:AVL只是平衡概念跟裡面的數值無關 03/24 20:07
asdd:我覺得應該是要從時間複雜度的角度去思考 03/24 20:41
asdd:AVL TREE也是一種BST 也可以利用中序追蹤來達到排序功能 03/24 20:43
wsx02:這題真奇怪 排序的時間複雜度都O(nlogn)呀 03/25 11:22
wsx02:轉去研所考題版問問 03/25 11:22
wsx02:建BST跟AVL都花O(nlogn) inorder=O(n), total=O(nlogn) 03/25 11:24
wsx02:轉錄至看板 Grad-ProbAsk 03/25 11:24