|
|
|
|
|
by VHRanger
3277 days ago
|
|
Sorry I misspoke. Lookup is always O(1) in a hash table. But this could be a "weak dict" that is you don't actually store the keys, as long as you can reference a key through a hash you can lookup. In the proper "data structure", we usually store the key and the value -- iteration through keys and/or values and/or pairs are probably supported operations. Finding a key in the structure (either with binary tree search, or binary search on a sorted array, or linear lookup on an array) varies. So does iteration and most other operations. |
|