Middle+
What is the worst-case time complexity of a hash table?
sobes.tech AI
Answer from AI
The worst-case time complexity for a hash table is O(n), where n is the number of elements in the table. This occurs in the case of severe collisions, when all keys hash to the same bucket (for example, due to a poor hash function or table overflow), and search, insert, or delete operations reduce to sequentially traversing the elements in that bucket.