Merge-insertion sort: Difference between revisions

Content deleted Content added
Undid revision 983695605 by HectorVisalia (talk) If you're going to do that, you could try harder to not leave commas at ends of sentences, remove references, and otherwise leave things worse than the passive you replaced.
Tag: Reverted
Line 2:
 
==Algorithm==
Hello Khaled !
Merge-insertion sort performs the following steps, on an input <math>X</math> of <math>n</math> elements:<ref>The original description by {{harvtxt|Ford|Johnson|1959}} sorted the elements in descending order. The steps listed here reverse the output, following the description in {{harvtxt|Knuth|1998}}. The resulting algorithm makes the same comparisons but produces ascending order instead.</ref>
#Group the elements of <math>X</math> into <math>\lfloor n/2\rfloor</math> pairs of elements, arbitrarily, leaving one element unpaired if there is an odd number of elements.