Redesign the AbstractHashMap class so that it halves the capacity of the table if the load factor falls below 0.25. Your solution must not involve any changes to the concrete ProbeHashMap and...
Popular Questions - Uncategorized
1. Our AbstractHashMap class maintains a load factor λ ≤ 0.5. Reimplement that class to allow the user to specify the maximum load, and adjust the concrete subclasses accordingly.2. Give a...
1. Modify our ProbeHashMap to use quadratic probing.2. Explain why a hash table is not suited to implement a sorted map.3. What is the worst-case asymptotic running time for performing n deletions...
Implement the containKey(k) method, as described in Exercise R-10.3, for the SortedTableClass.Exercise R-10.3The use of null values in a map is problematic, as there is then no way to differentiate...
1. Describe how a sorted list implemented as a doubly linked list could be used to implement the sorted map ADT.2. Consider the following variant of the findIndex method of the SortedTableMap class,...
What is the expected running time of the methods for maintaining a maxima set if we insert n pairs such that each pair has lower cost and performance than one before it? What is contained in the...
Recent Comments