What is the worst-case time complexity of searching for an element in a Hash Table of size m containing n elements when using chaining?
Show answer
O(n)
In the worst case, all n keys hash to the same slot, creating a single linked list of length n. However, under the assumption of simple uniform hashing, the average-case search time is O(1 + alpha), where alpha is the load factor.