I need to understand the architecture and functions of hash set very well.
Compared with STL::set, what is the advantage of hash set compared with STL::set ? I think the O(1) time to do search. If this is true, why not to use hash table ? Their difference is duplicated element ? or others ?
For STL::set, the search time of smallest/largest is also O(1), because it has been ordered.
A hash set is not a binary search tree, how to find the smallest or largest element with O(1) ?
After reading What is the difference between set and hashset in C++ STL?
I cannot find the answer .
My idea:
When should use hash set not hash table ?
STL::set is ordered set. So, it is O(1) to get smallest/largest element.
What if for hash set ? it is ordered ?
thanks