What kind of tree implementation is STL set?

后端 未结 1 1848
南方客
南方客 2020-12-10 09:55

I know that in STL vector represents the implementation of a dynamic array. So does the list represents the implementation of a linked list (doubl

相关标签:
1条回答
  • 2020-12-10 10:15

    The standard imposes no restrictions on the implementation (other than the complexity guarantees).

    In other words, it's implementation-dependent. Typically, it's a red-black tree (see e.g. /usr/include/c++/x.y.z/bits/stl_tree.h, where x.y.z is your particular GCC version).

    0 讨论(0)
提交回复
热议问题