Unformatted text preview: alone the path from leaf to root, which takes O(log n). Clearly, heap is not efficient for operation MEMBER and DELETE. The recommended ADT will be 23 tree and AVL tree and Binary Search Trees if we can guarantee the randomness of data. Both 23 and AVL have O(log n) time worst case complexity for all three operations, Binary Search Trees have O(log n) average case complexity. There is no best implementation. If the amount of data is large, 23 tree and AVL tree are better. However, if the amount of data is small, heap can be a good implementation, because the overhead for the reconstruction of 23 tree and AVL tree is quite large. In addition, if, space efficiency is more concerned, AVL tree is better, because 23 tree requires more memory for interior nodes. If we can guarantee the randomness, binary search trees are the best....
View
Full Document
 Spring '03
 janicki
 Analysis of algorithms, Binary search trees

Click to edit the document details