+1 (218) 451-4151
glass
pen
clip
papers
heaphones

Suppose we wish to support a new method countRange(k 1 , k 2 ) that determines how many keys of a…

Suppose we wish to support a new method countRange(k 1 , k 2 ) that determines how many keys of a…

Suppose we wish to support a new method countRange(k1, k2) that determines how many keys of a sorted map fall in the specified range. We could clearly implement this in O(s + h) time by adapting our approach to subMap. Describe how to modify the search-tree structure to support O(h) worst-case time for countRange.