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

Giao Linh

New member
What is the worst case time complexity of insertion operation(n =no. of candidates)?
A. O(1)
B. O(n)
C. O(log n)
D. O(n log n)
 
Answer: a
Explanation: The worst case in a bin insert operation occurs when all the candidates are concentrated in one bin. So in this case the time complexity is O(1).
 

Tìm kiếm

Back
Top