<tfoot id='fk8qo'></tfoot>

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

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

        <bdo id='fk8qo'></bdo><ul id='fk8qo'></ul>
      1. <legend id='fk8qo'><style id='fk8qo'><dir id='fk8qo'><q id='fk8qo'></q></dir></style></legend>

      2. 为什么有人会使用 set 而不是 unordered_set?

        时间:2023-06-04
          <tbody id='KO1lX'></tbody>
        <i id='KO1lX'><tr id='KO1lX'><dt id='KO1lX'><q id='KO1lX'><span id='KO1lX'><b id='KO1lX'><form id='KO1lX'><ins id='KO1lX'></ins><ul id='KO1lX'></ul><sub id='KO1lX'></sub></form><legend id='KO1lX'></legend><bdo id='KO1lX'><pre id='KO1lX'><center id='KO1lX'></center></pre></bdo></b><th id='KO1lX'></th></span></q></dt></tr></i><div id='KO1lX'><tfoot id='KO1lX'></tfoot><dl id='KO1lX'><fieldset id='KO1lX'></fieldset></dl></div>
          <bdo id='KO1lX'></bdo><ul id='KO1lX'></ul>

          <legend id='KO1lX'><style id='KO1lX'><dir id='KO1lX'><q id='KO1lX'></q></dir></style></legend>

          <tfoot id='KO1lX'></tfoot>
              • <small id='KO1lX'></small><noframes id='KO1lX'>

                  本文介绍了为什么有人会使用 set 而不是 unordered_set?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  C++0x 正在引入 unordered_set,它可以在 boost 和许多其他地方使用.我的理解是 unordered_set 是具有 O(1) 查找复杂性的哈希表.另一方面,set 只不过是具有 log(n) 查找复杂性的树.到底为什么有人会使用set 而不是unordered_set?即是否需要 set 了?

                  C++0x is introducing unordered_set which is available in boost and many other places. What I understand is that unordered_set is hash table with O(1) lookup complexity. On the other hand, set is nothing but a tree with log(n) lookup complexity. Why on earth would anyone use set instead of unordered_set? i.e is there a need for set anymore?

                  推荐答案

                  对于想要迭代集合中的项目的人来说,顺序很重要.

                  When, for someone who wants to iterate over the items of the set, the order matters.

                  这篇关于为什么有人会使用 set 而不是 unordered_set?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在链表中添加列表项或节点 下一篇:如何有效地合并两个 BST?

                  相关文章

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

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

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