What is the worst-case asymptotic running time for performing n deletions from a SortedTableMap instance that initially contains 2 n entries? Consider the following variant of the find index method...

What is the worst-case asymptotic running time for performing
n
deletions



from a SortedTableMap instance that initially contains 2n
entries?


Consider the following variant of the find index method from Code Fragment


10.8, in the context of the SortedTableMap class:


def find index(self, k, low, high):


if high


return high + 1


else:


mid = (low + high) // 2


if self. table[mid]. key


return self. find index(k, mid + 1, high)


else:


return self. find index(k, low, mid − 1)


Does this always produce the same result as the original version? Justify


your answer.




May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here