3 ms·
Not quite sure what to take away from this brief sentence. By "hash table interface" does one include the O(1) lookups? That the elements must implement equali
by magicalhippo 2y ago
Not quite sure what to take away from this brief sentence.
By "hash table interface" does one include the O(1) lookups? That the elements must implement equality comparison and a hash value function? Or simply just generic non-ordered key-value store?
Often one just needs a key-value store, and O(log n) access is sufficient. Other times one needs the O(1). Sometimes the elements can't be compared for equality, but can be ordred.
But yes, dictionaries are very useful.