It's well known, that next element search complexity in binary tree is O(log(N)). But whether tree nodes are also double linked list nodes, complexity would be O(1).
So, the question is: are std::set nodes also double linked list nodes by C++ standard, or it depends on realization? In other worlds, has it++
operation complexity O(log(N)
or O(1)
, where N is the number of set elements?
I didn't find corresponding subsection or paragraph in section "Iterators library" of https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf Maybe I searched badly.