What is the worst case time complexity of delete operation(n is the no. of candidates)?

Category: QuestionsWhat is the worst case time complexity of delete operation(n is the no. of candidates)?
Editor">Editor Staff asked 4 weeks ago

What is the worst case time complexity of delete operation(n is the no. of candidates)?
 
(a) O(1)
 
(b) O(n)
 
(c) O(log n)
 
(d) O(n log n)
 
My question is from Trees in division Trees of Data Structures & Algorithms I
 
The question was asked in class test.

1 Answers
Editor">Editor Staff answered 4 weeks ago

The correct choice is (b) O(n)
 
Easiest explanation – The worst case in a bin delete operation occurs when all the candidates are concentrated in one bin. So in this case the time complexity is O(n).