What Is The Complexity Of Set In C++

Правка en1, от kalimm, 2015-11-18 02:04:48
set < int > s;
...
for(set < int > :: iterator it = s.begin(); it != s.end(); it++)
    doSomething();

What is the complexity of this code? Cost of it++ is O(1) or O(log(n)) or another complexity? Do you have any ideas about it?

Thanks for help.

Теги set, c++, complexity

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский kalimm 2015-11-18 02:04:48 312 Initial revision (published)