+1 vote
in Data Structures & Algorithms I by (88.2k points)
What will be the time complexity of delete operation if all the candidates are evenly spaced so that each bin has constant no. of candidates? (m = number of bins intersecting candidate intersects)

(a) O(1)

(b) O(m)

(c) O(m^2)

(d) O(log m)

This interesting question is from Trees topic in chapter Trees of Data Structures & Algorithms I

I had been asked this question in my homework.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
Right option is (b) O(m)

The best I can explain: The process of deletion becomes faster in a case when the number of candidates are equally distributed among the bins. In such a case the query operation becomes O(m). It is practically slower than insertion in this case.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...