<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Timsort - Page 11 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Timsort&amp;p=10">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Timsort&amp;p=12">3.Next</a>
</p>
<p>added at the fifth position of the second run in order to preserve its order. Therefore, [1, 2, 3] and [12, 14, 17] are already in their final positions and the runs in which elements movements are required are [6, 10] and [4, 5, 7, 9]. With this knowledge, we only need to allocate a temporary buffer of size 2 instead of 4.</p>

<p><big> Merge direction </big></p>
<p>Merging can be done in both directions: left-to-right, as in the traditional mergesort, or right-to-left.</p>

<p><big> Galloping mode during merge </big></p>
<p>An individual merge of runs R1 and</p><p>
<a accesskey="1" href="page.php?w=Timsort&amp;p=10">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Timsort&amp;p=12">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
