• <tfoot id='93lqy'></tfoot>

      1. <legend id='93lqy'><style id='93lqy'><dir id='93lqy'><q id='93lqy'></q></dir></style></legend>
          <bdo id='93lqy'></bdo><ul id='93lqy'></ul>
        <i id='93lqy'><tr id='93lqy'><dt id='93lqy'><q id='93lqy'><span id='93lqy'><b id='93lqy'><form id='93lqy'><ins id='93lqy'></ins><ul id='93lqy'></ul><sub id='93lqy'></sub></form><legend id='93lqy'></legend><bdo id='93lqy'><pre id='93lqy'><center id='93lqy'></center></pre></bdo></b><th id='93lqy'></th></span></q></dt></tr></i><div id='93lqy'><tfoot id='93lqy'></tfoot><dl id='93lqy'><fieldset id='93lqy'></fieldset></dl></div>

        <small id='93lqy'></small><noframes id='93lqy'>

      2. STL设置了什么样的树实现?

        What kind of tree implementation is STL set?(STL设置了什么样的树实现?)

        1. <tfoot id='OrYWs'></tfoot>

          <small id='OrYWs'></small><noframes id='OrYWs'>

                  <tbody id='OrYWs'></tbody>
                <i id='OrYWs'><tr id='OrYWs'><dt id='OrYWs'><q id='OrYWs'><span id='OrYWs'><b id='OrYWs'><form id='OrYWs'><ins id='OrYWs'></ins><ul id='OrYWs'></ul><sub id='OrYWs'></sub></form><legend id='OrYWs'></legend><bdo id='OrYWs'><pre id='OrYWs'><center id='OrYWs'></center></pre></bdo></b><th id='OrYWs'></th></span></q></dt></tr></i><div id='OrYWs'><tfoot id='OrYWs'></tfoot><dl id='OrYWs'><fieldset id='OrYWs'></fieldset></dl></div>
                • <bdo id='OrYWs'></bdo><ul id='OrYWs'></ul>

                  <legend id='OrYWs'><style id='OrYWs'><dir id='OrYWs'><q id='OrYWs'></q></dir></style></legend>
                  本文介绍了STL设置了什么样的树实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我知道在 STL 中 vector 表示动态数组的实现.list 表示链表(双向链表)的实现也是如此.我知道 set 有一个类似于 tree 的实现.从算法复杂度来看,集合中的大多数内置函数都是复杂度o(1)o(log n).那么这棵树是作为平衡树实现的还是任何其他类型的树,例如红黑树,如果是这样,为什么选择这样的树结构?

                  I know that in STL vector represents the implementation of a dynamic array. So does the list represents the implementation of a linked list (doubly linked list). I know that set has an implementation similar to tree . Looking at the algorithm complexity as mentioned most of the inbuilt function in set is of complexity o(1) or o(log n). So is this tree implemented as Balanced Tree or any other kind of tree such as red-black tree and if So Why such a tree structure was chosen ?

                  推荐答案

                  该标准对实现没有任何限制(除了复杂性保证).

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

                  换句话说,它依赖于实现.通常,它是一棵红黑树(参见例如 /usr/include/c++/xyz/bits/stl_tree.h,其中 xyz 是您的特定 GCC 版本).

                  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).

                  这篇关于STL设置了什么样的树实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Consistent pseudo-random numbers across platforms(跨平台一致的伪随机数)
                  Vary range of uniform_int_distribution(改变uniform_int_distribution的范围)
                  What is a seed in terms of generating a random number?(就生成随机数而言,种子是什么?)
                  Is 1.0 a valid output from std::generate_canonical?(1.0 是 std::generate_canonical 的有效输出吗?)
                  Getting big random numbers in C/C++(在 C/C++ 中获取大随机数)
                  What is the best way to generate random numbers in C++?(在 C++ 中生成随机数的最佳方法是什么?)

                  <small id='Z37OO'></small><noframes id='Z37OO'>

                      <tbody id='Z37OO'></tbody>
                    <tfoot id='Z37OO'></tfoot>
                    <i id='Z37OO'><tr id='Z37OO'><dt id='Z37OO'><q id='Z37OO'><span id='Z37OO'><b id='Z37OO'><form id='Z37OO'><ins id='Z37OO'></ins><ul id='Z37OO'></ul><sub id='Z37OO'></sub></form><legend id='Z37OO'></legend><bdo id='Z37OO'><pre id='Z37OO'><center id='Z37OO'></center></pre></bdo></b><th id='Z37OO'></th></span></q></dt></tr></i><div id='Z37OO'><tfoot id='Z37OO'></tfoot><dl id='Z37OO'><fieldset id='Z37OO'></fieldset></dl></div>

                        <bdo id='Z37OO'></bdo><ul id='Z37OO'></ul>

                      • <legend id='Z37OO'><style id='Z37OO'><dir id='Z37OO'><q id='Z37OO'></q></dir></style></legend>