What Is The Complexity Of Set In C++

Revision en1, by 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.

Tags set, c++, complexity

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English kalimm 2015-11-18 02:04:48 312 Initial revision (published)