Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Sorting is the process of applying some order to a collection of items. There are various <a href="/questions/tagged/algorithms" class="post-tag" title="show questions tagged &#39;algorithms&#39;" rel="tag">algorithms</a> for doing this, including <a href="/questions/tagged/mergesort" class="post-tag" title="show questions tagged &#39;mergesort&#39;" rel="tag">mergesort</a>, <a href="/questions/tagged/quicksort" class="post-tag" title="show questions tagged &#39;quicksort&#39;" rel="tag">quicksort</a>, and <a href="/questions/tagged/heapsort" class="post-tag" title="show questions tagged &#39;heapsort&#39;" rel="tag">heapsort</a>.</p> <p>From the <a href="http://en.wikipedia.org/wiki/Sorting_algorithm" rel="nofollow noreferrer">Sorting Algorithms Wikipedia entry</a>:</p> <blockquote> <p>In <a href="/questions/tagged/computer-science" class="post-tag" title="show questions tagged &#39;computer-science&#39;" rel="tag">computer-science</a> a <a href="/questions/tagged/sorting-algorithm" class="post-tag" title="show questions tagged &#39;sorting-algorithm&#39;" rel="tag">sorting-algorithm</a> is an <em>algorithm</em> that puts elements of a list in a certain order. The most-used orders are <a href="/questions/tagged/numerical" class="post-tag" title="show questions tagged &#39;numerical&#39;" rel="tag">numerical</a> order and <a href="/questions/tagged/lexicographical" class="post-tag" title="show questions tagged &#39;lexicographical&#39;" rel="tag">lexicographical</a> order. Efficient sorting is important for optimizing the use of other algorithms (such as search and merge algorithms) that require sorted lists to work correctly; it is also often useful for <a href="/questions/tagged/canonicalizing" class="post-tag" title="show questions tagged &#39;canonicalizing&#39;" rel="tag">canonicalizing</a> data and for producing human-readable <a href="/questions/tagged/output" class="post-tag" title="show questions tagged &#39;output&#39;" rel="tag">output</a>. More formally, the output must satisfy two conditions:</p> <ol> <li>The output is in nondecreasing order (each element is no smaller than the previous element according to the desired total order);</li> <li>The output is a permutation (reordering) of the input.</li> </ol> </blockquote> <p><strong>Related tags:</strong></p> <ul> <li><a href="/questions/tagged/alphabetical-sort" class="post-tag" title="show questions tagged &#39;alphabetical-sort&#39;" rel="tag">alphabetical-sort</a></li> <li><a href="/questions/tagged/bubble-sort" class="post-tag" title="show questions tagged &#39;bubble-sort&#39;" rel="tag">bubble-sort</a></li> <li><a href="/questions/tagged/bucket-sort" class="post-tag" title="show questions tagged &#39;bucket-sort&#39;" rel="tag">bucket-sort</a></li> <li><a href="/questions/tagged/heapsort" class="post-tag" title="show questions tagged &#39;heapsort&#39;" rel="tag">heapsort</a></li> <li><a href="/questions/tagged/insertion-sort" class="post-tag" title="show questions tagged &#39;insertion-sort&#39;" rel="tag">insertion-sort</a></li> <li><a href="/questions/tagged/mergesort" class="post-tag" title="show questions tagged &#39;mergesort&#39;" rel="tag">mergesort</a></li> <li><a href="/questions/tagged/natural-sort" class="post-tag" title="show questions tagged &#39;natural-sort&#39;" rel="tag">natural-sort</a></li> <li><a href="/questions/tagged/quicksort" class="post-tag" title="show questions tagged &#39;quicksort&#39;" rel="tag">quicksort</a></li> <li><a href="/questions/tagged/radix-sort" class="post-tag" title="show questions tagged &#39;radix-sort&#39;" rel="tag">radix-sort</a></li> <li><a href="/questions/tagged/selection-sort" class="post-tag" title="show questions tagged &#39;selection-sort&#39;" rel="tag">selection-sort</a></li> <li><a href="/questions/tagged/shellsort" class="post-tag" title="show questions tagged &#39;shellsort&#39;" rel="tag">shellsort</a></li> <li><a href="/questions/tagged/stable-sort" class="post-tag" title="show questions tagged &#39;stable-sort&#39;" rel="tag">stable-sort</a></li> <li><a href="/questions/tagged/topological-sort" class="post-tag" title="show questions tagged &#39;topological-sort&#39;" rel="tag">topological-sort</a></li> <li><a href="/questions/tagged/counting-sort" class="post-tag" title="show questions tagged &#39;counting-sort&#39;" rel="tag">counting-sort</a></li> <li><a href="https://en.wikipedia.org/wiki/Quantum_sort" rel="nofollow noreferrer">Quantum-sort</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload