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

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

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

        <tfoot id='gCt4G'></tfoot>

        std::sort() 中使用哪种类型的排序?

        时间:2024-05-11
        <legend id='9VFZg'><style id='9VFZg'><dir id='9VFZg'><q id='9VFZg'></q></dir></style></legend>
              <tbody id='9VFZg'></tbody>
            <i id='9VFZg'><tr id='9VFZg'><dt id='9VFZg'><q id='9VFZg'><span id='9VFZg'><b id='9VFZg'><form id='9VFZg'><ins id='9VFZg'></ins><ul id='9VFZg'></ul><sub id='9VFZg'></sub></form><legend id='9VFZg'></legend><bdo id='9VFZg'><pre id='9VFZg'><center id='9VFZg'></center></pre></bdo></b><th id='9VFZg'></th></span></q></dt></tr></i><div id='9VFZg'><tfoot id='9VFZg'></tfoot><dl id='9VFZg'><fieldset id='9VFZg'></fieldset></dl></div>

          1. <tfoot id='9VFZg'></tfoot>

            <small id='9VFZg'></small><noframes id='9VFZg'>

              • <bdo id='9VFZg'></bdo><ul id='9VFZg'></ul>
                  本文介绍了std::sort() 中使用哪种类型的排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  Can anyone please tell me that which type of sorting technique (bubble, insertion, selection, quick, merge, count...) is implemented in the std::sort() function defined in the <algorithm> header file?

                  解决方案

                  Most implementations of std::sort use quicksort, (or usually a hybrid algorithm like introsort, which combines quicksort, heapsort and insertion sort).

                  The only thing the standard requires is that std::sort somehow sort the data according to the specified ordering with a complexity of approximately O(N log(N)); it is not guaranteed to be stable. Technically, introsort better meets the complexity requirement than quicksort, because quicksort has quadratic worst-case time.

                  这篇关于std::sort() 中使用哪种类型的排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:STL 迭代器是否保证集合更改后的有效性? 下一篇:std::成员函数指针的映射?

                  相关文章

                  <tfoot id='diI1n'></tfoot>

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

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

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