3 ms·
C++'s standard library containers & algorithms have strict algorithmic complexity requirements & guarantees. For example from std::vector::insert [1]: Compl
by hermitdev 9y ago
C++'s standard library containers & algorithms have strict algorithmic complexity requirements & guarantees.
For example from std::vector::insert [1]:
Complexity
1-2) Constant plus linear in the distance between pos and end of the container.
3) Linear in count plus linear in the distance between pos and end of the container.
4) Linear in std::distance(first, last) plus linear in the distance between pos and end of the container.
5) Linear in ilist.size() plus linear in the distance between pos and end of the container.
[1][http://en.cppreference.com/w/cpp/container/vector/insert http://en.cppreference.com/w/cpp/container/vector/insert]
edit: formatting