Consider lines 31–33 of Code Fragment 10.8 in our implementation of the class ChainHashMap. We use the difference in the size of a secondary bucket before and after a call to bucket.remove(k) to...
Articles Posted by admin
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...
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,...
Repeat Exercise C-10.33 for the ProbeHashMap class.Exercise C-10.33Consider the goal of adding entry (k,v) to a map only if there does not yet exist some other entry with key k. For a map M (without...
1. If we let n denote the size of set S, and m denote the size of set T, what would be the running time of the operation S.addAll(T), as implemented on page 446, if both sets were implemented using...
Recent Comments