set vs unordered_set

Revision en1, by Jim_Moriarty_, 2020-06-01 10:52:42

I wanted to ask which one is better to use because avg. case complexity of set is log(n) while that of unordered_set is o(1) while worst case of set is same but that of unordered set is o(n).

And what are the points that we should take care of while using unordered_set so that we can work with no changes in inbuilt unordered_set?

Any help would be appreciated.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Jim_Moriarty_ 2020-06-01 10:52:42 393 Initial revision (published)