1. Perform an experimental study to compare the speed of our AVL tree, splay tree, and red-black tree implementations for various sequences of operations.2. Implement the Sorted Map ADT using a...
Popular Questions - Uncategorized
Consider a sorted map that is implemented with a standard binary search tree T. Describe how to perform an operation removeSubMap(k1, k2) that removes all the entries whose keys fall within...
In describing multisets and multimaps in Section 10.5.3, we describe a general approach for adapting a traditional map by storing all duplicates within a secondary container as a value in the map....
1. Let T be a red-black tree storing n entries, and let k be the key of an entry in T. Show how to construct from T, in O(logn) time, two red-black trees T′ and T′′, such that T′ contains all the...
Prepare an implementation of splay trees that uses top-down splaying as described in Exercise C-11.52. Perform extensive experimental studies to compare its performance to the standard bottom-up...
Repeat the previous problem using an AVL tree, achieving a running time of O(slogn). Why doesn’t the solution to the previous problem trivially result in an O(s+logn) algorithm for AVL...
Recent Comments