<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Quicksort]]></title><description><![CDATA[<p>Hallo,<br />
ich habe mal eine Frag zu einem Teil einer Quicksort Implementierung:</p>
<pre><code class="language-cpp">do {
   while(a[li] &lt; el) ++li;
   while(el &lt; a[re]) --re;
   if(li&lt;re) tausche (a[li],a[re]);
   if(li&lt;=re) {++li; --re;}
}while(li&lt;=re);
if(links &lt; re) quicksort (a,links,re);
if(li &lt; rechts) quicksort (a,li,rechts);
</code></pre>
<p>Wenn ich jetzt z.B. die Liste habe;</p>
<p>1234</p>
<p>und als Pivot Element 2 wähle. Sehe ich das richtig, dass die Funktion mit der Liste 34 ein 2. Mal aufgerufen wird? Also dass Quicksort nicht im Ersten Anlauf erkennt, ob eine Liste schon sortiert ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/262688/quicksort</link><generator>RSS for Node</generator><lastBuildDate>Sun, 06 Sep 2026 11:04:55 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/262688.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 09 Mar 2010 22:49:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Quicksort on Tue, 09 Mar 2010 22:49:00 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich habe mal eine Frag zu einem Teil einer Quicksort Implementierung:</p>
<pre><code class="language-cpp">do {
   while(a[li] &lt; el) ++li;
   while(el &lt; a[re]) --re;
   if(li&lt;re) tausche (a[li],a[re]);
   if(li&lt;=re) {++li; --re;}
}while(li&lt;=re);
if(links &lt; re) quicksort (a,links,re);
if(li &lt; rechts) quicksort (a,li,rechts);
</code></pre>
<p>Wenn ich jetzt z.B. die Liste habe;</p>
<p>1234</p>
<p>und als Pivot Element 2 wähle. Sehe ich das richtig, dass die Funktion mit der Liste 34 ein 2. Mal aufgerufen wird? Also dass Quicksort nicht im Ersten Anlauf erkennt, ob eine Liste schon sortiert ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1866760</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1866760</guid><dc:creator><![CDATA[JosephB]]></dc:creator><pubDate>Tue, 09 Mar 2010 22:49:00 GMT</pubDate></item><item><title><![CDATA[Reply to Quicksort on Tue, 09 Mar 2010 23:10:47 GMT]]></title><description><![CDATA[<p>Ja. Quicksort ist in Θ(nlogn).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1866762</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1866762</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Tue, 09 Mar 2010 23:10:47 GMT</pubDate></item><item><title><![CDATA[Reply to Quicksort on Wed, 10 Mar 2010 16:34:16 GMT]]></title><description><![CDATA[<p>ich hab grade eifnach mal verscuht den quciksort zu optimieren indem ich einfach einen test anfangs mit rein genommen habe</p>
<p>und zwar geht der einfach alle zahlen durch, solange die aktuelle zahl kleienr als die nächste ist</p>
<p>bei kleinen mengen an zahlen 10-20 in der grössen ordnung ist de rgeschwindigkeitsvorteil sauhoch, ich schätze mal nur so 20 prozent oder sowas (also beis chon sortierten listen)<br />
aber bei grossen mengen ist das eine bremse bis zum geht nicht mehr 1200% länger</p>
<p>voll hart</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1867093</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1867093</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Wed, 10 Mar 2010 16:34:16 GMT</pubDate></item><item><title><![CDATA[Reply to Quicksort on Wed, 10 Mar 2010 16:41:56 GMT]]></title><description><![CDATA[<p>Sinnvoller ist es wahrscheinlich, unterhalb einer bestimmten Arraygröße (welche, muss man experimentell ermitteln) einen anderen Sortieralgorithmus zu verwenden. Vielleicht einen, für den ein schon sortiertes Array der günstigste Fall ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1867096</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1867096</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Wed, 10 Mar 2010 16:41:56 GMT</pubDate></item></channel></rss>