Finding time complexity of the minimal element in hash table?

138 Views Asked by At

I want to understand and solve the next task: If we draw elements from a universal set U and insert n (different) elements into an empty hash table T of length m , for m = O(n) , what is the time complexity of finding the minimal element in a T?

I would say linear because we have 0 elements and as the input grows, the algorithm takes proportionally longer to complete. But algorithm with this time complexity will process the input (n) in “n” number of operations. If I'm correct, what happens when the number of elements and length isn't the same, since we have n different elements and m length which is equal to O(n)?