set vs unordered_set

Правка en1, от 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.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Jim_Moriarty_ 2020-06-01 10:52:42 393 Initial revision (published)