<?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[Insertion Sort]]></title><description><![CDATA[<pre><code class="language-cpp">void insertionsort(char* arr,int length)
 {
     int j,i;char tmp;

     for(int i=1;i&lt;length;i++)
	 {
		 tmp=arr[i];j=i;

		 for(j;j&gt;0 &amp;&amp; (tmp&lt;arr[j-1]);j--)  // Pruefung j&gt;0 kann 
			 arr[j]=arr[j-1];         // weggelassen werden

		 arr[j]=tmp;
     }
}
</code></pre>
<p>die 2.Schleife funktioniert auch ohne die Prüfung ob j&gt;0 ist.<br />
Wie kann das sein. Zufall ?? auf alle Fälle wird geprüft ob<br />
arr[-1] also mit negativen Index wenn ich die Prüfung auf j&gt;0 weglasse.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/270710/insertion-sort</link><generator>RSS for Node</generator><lastBuildDate>Sat, 29 Aug 2026 22:11:44 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/270710.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Jul 2010 23:04:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Insertion Sort on Fri, 16 Jul 2010 23:05:24 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">void insertionsort(char* arr,int length)
 {
     int j,i;char tmp;

     for(int i=1;i&lt;length;i++)
	 {
		 tmp=arr[i];j=i;

		 for(j;j&gt;0 &amp;&amp; (tmp&lt;arr[j-1]);j--)  // Pruefung j&gt;0 kann 
			 arr[j]=arr[j-1];         // weggelassen werden

		 arr[j]=tmp;
     }
}
</code></pre>
<p>die 2.Schleife funktioniert auch ohne die Prüfung ob j&gt;0 ist.<br />
Wie kann das sein. Zufall ?? auf alle Fälle wird geprüft ob<br />
arr[-1] also mit negativen Index wenn ich die Prüfung auf j&gt;0 weglasse.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1927474</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1927474</guid><dc:creator><![CDATA[blurry333]]></dc:creator><pubDate>Fri, 16 Jul 2010 23:05:24 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Fri, 16 Jul 2010 23:50:03 GMT]]></title><description><![CDATA[<p>Da wird zufällig gerade neben dem, was du als arr an die Funktion übergibst, ein größerer Wert im Speicher liegen. Das Verhalten ist natürlich höchst undefiniert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1927482</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1927482</guid><dc:creator><![CDATA[seldon]]></dc:creator><pubDate>Fri, 16 Jul 2010 23:50:03 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sat, 17 Jul 2010 09:19:54 GMT]]></title><description><![CDATA[<p>IM Algorithmen Buch von Robert Sedgewick stehts aber genauso drin.<br />
Es scheint trotzdem so zu funktionieren. Vielleicht bricht er bei einem<br />
negativen Index automatisch ab. Ich hab keine Ahnung</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1927540</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1927540</guid><dc:creator><![CDATA[blurry333]]></dc:creator><pubDate>Sat, 17 Jul 2010 09:19:54 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sat, 17 Jul 2010 09:54:59 GMT]]></title><description><![CDATA[<p>blurry333 schrieb:</p>
<blockquote>
<pre><code class="language-cpp">// snip code
</code></pre>
<p>die 2.Schleife funktioniert auch ohne die Prüfung ob j&gt;0 ist.<br />
Wie kann das sein. Zufall ?? auf alle Fälle wird geprüft ob<br />
arr[-1] also mit negativen Index wenn ich die Prüfung auf j&gt;0 weglasse.</p>
</blockquote>
<p>Und?</p>
<pre><code class="language-cpp">for(int i=1;i&lt;length;i++)
	 {
		 tmp=arr[i];j=i;
</code></pre>
<p><code>i</code> fängt bei 1 an, <code>j = i</code> ; Also wird <code>j</code> minimaler Weise 0 ... wo ist das Problem?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1927552</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1927552</guid><dc:creator><![CDATA[padreigh]]></dc:creator><pubDate>Sat, 17 Jul 2010 09:54:59 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sat, 17 Jul 2010 09:58:41 GMT]]></title><description><![CDATA[<p>Vielleicht solltest du noch eine Seite weiterlesen im Buch:</p>
<blockquote>
<p>Es muß noch eine wichtige Einzelheit betrachtet werden: Für die meisten Eingaben funktioniert die Prozedur insertion nicht! Die while-Anweisung läuft über dsa linke Ende des Feldes hinaus, wenn v [bei dir temp] das kleinste Element im Feld ist. Um Abhilfe zu schaffen, setzen wir einen &quot;Marken&quot;-Schlüssel (&quot;sentinel&quot;-key&quot;) auf a[0], den wir mindestens so klein wählen wie das kleinste Element im Feld. Marken werden gewöhnlich in Situationen wie dieser verwendet, um die Aufnahme eines nahezu immer positiv ausfallenden Tests (im vorliegenden Falle j &gt; 1) in die innere Schleife zu vermeiden.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1927555</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1927555</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Sat, 17 Jul 2010 09:58:41 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sat, 17 Jul 2010 09:59:41 GMT]]></title><description><![CDATA[<p>padreigh schrieb:</p>
<blockquote>
<p><code>i</code> fängt bei 1 an, <code>j = i</code> ; Also wird <code>j</code> minimaler Weise 0 ... wo ist das Problem?</p>
</blockquote>
<p>Beim j--, siehe innere Schleife.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1927558</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1927558</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Sat, 17 Jul 2010 09:59:41 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sat, 17 Jul 2010 10:15:37 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">void insertionsort(char* arr,int length) 
 { 
     int j,i;char tmp; 

     for(int i=1;i&lt;length;i++) 
     { 
         tmp=arr[i];j=i; 

         for(j;tmp&lt;arr[j-1];j--)  //j wird runtergezählt   
             arr[j]=arr[j-1];    // j kann theoretisch unendlich klein sein     

         arr[j]=tmp; 
     } 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1927564</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1927564</guid><dc:creator><![CDATA[blurry333]]></dc:creator><pubDate>Sat, 17 Jul 2010 10:15:37 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sat, 17 Jul 2010 11:02:50 GMT]]></title><description><![CDATA[<p>wie würde denn der Code mit Sentinel aussehen ?</p>
<p>Ich les da grad was von Sentinel Schlüssel der mindestens so klein<br />
wie das kleinste Element sein soll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1927571</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1927571</guid><dc:creator><![CDATA[blurry333]]></dc:creator><pubDate>Sat, 17 Jul 2010 11:02:50 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sat, 17 Jul 2010 11:31:19 GMT]]></title><description><![CDATA[<p>blurry333 schrieb:</p>
<blockquote>
<p>Ich les da grad was von Sentinel Schlüssel der mindestens so klein<br />
wie das kleinste Element sein soll.</p>
</blockquote>
<p>Das ist jetzt nicht dein Ernst, oder? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1927585</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1927585</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Sat, 17 Jul 2010 11:31:19 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sat, 17 Jul 2010 11:38:58 GMT]]></title><description><![CDATA[<p>ich muss den kleinsten Wert im array ja erst mal suchen oder.</p>
<p>und a[0] den kleinsten Wert im array zuweisen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1927590</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1927590</guid><dc:creator><![CDATA[blurry333]]></dc:creator><pubDate>Sat, 17 Jul 2010 11:38:58 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 14:26:12 GMT]]></title><description><![CDATA[<p>in wikipedia steht der Insertion Sort soll bei ziemlich kleinen<br />
Eingabenmengen effizient sein. Ich seh jetzt eigentlich nur den vorteil<br />
bei vorsortierten Eingabedaten. hmm...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928105</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928105</guid><dc:creator><![CDATA[blurry333]]></dc:creator><pubDate>Sun, 18 Jul 2010 14:26:12 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 14:46:31 GMT]]></title><description><![CDATA[<p>blurry333 schrieb:</p>
<blockquote>
<p>in wikipedia steht der Insertion Sort soll bei ziemlich kleinen<br />
Eingabenmengen effizient sein. Ich seh jetzt eigentlich nur den vorteil<br />
bei vorsortierten Eingabedaten. hmm...</p>
</blockquote>
<p>Ist das eine Frage oder eine Feststellung?</p>
<p>Insertion Sort ist bei kleinen Eingabemengen effizient, weil es sehr sehr einfach aufgebaut ist. Du hast ja neulich schonmal so viele Fragen zur Leufzeitanalyse gestellt (das warst doch du, oder erinnere ich mich falsch?). Insertion Sort ist zwar O(n²), aber da es so einfach aufgbaut ist, ist der Vorfaktor vor dem O(n²) meistens sehr viel kleiner als bei den viel komplexer arbeitenden O(n*log(n))-Algorithmen. Das geht sogar so weit, dass gute Implementierungen der O(n*log(n))-Algorithmen Quicksort oder Mergesort ein Insertion Sort für kleine Eingabemengen benutzen (Quicksort und Mergesort teilen grob gesagt die Eingabemenge rekursiv in immer kleinere Teilmengen auf, die dann sortiert werden. Ab einer gewissen Größe wird dazu zu Insertion Sort gewechselt, anstatt am Ende einelementige Mengen zu &quot;sortieren&quot;).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928118</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928118</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Sun, 18 Jul 2010 14:46:31 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 14:56:16 GMT]]></title><description><![CDATA[<blockquote>
<p>Das geht sogar so weit, dass gute Implementierungen der O(n*log(n))-Algorithmen Quicksort oder Mergesort</p>
</blockquote>
<p>Quicksort ist nicht in O(nlogn), sondern O(n^2). Diese blöde Pivotwahl macht alles kaputt. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
(obwohl es eine wirkliche O(nlogn) Variante von Quicksort gibt, die hat aber wegen eine kompilzierten Pivotwahl eine extrem hohe Konstante und wird daher nicht eingesetzt)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928122</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928122</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Sun, 18 Jul 2010 14:56:16 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 15:06:41 GMT]]></title><description><![CDATA[<p>tatsächlich:</p>
<p>Hab hier 2 Formel für den average case:</p>
<p>Quicksort: 1.5 * (n*log n)<br />
Selection Sort : 0.25 * n^2 .</p>
<p>bei n=8 z.B. ist selection sort besser.</p>
<p>Frag mich grad wo die Grenze ist. z.B. n=100 ist quicksort besser</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928135</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928135</guid><dc:creator><![CDATA[blurry333]]></dc:creator><pubDate>Sun, 18 Jul 2010 15:06:41 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 15:11:14 GMT]]></title><description><![CDATA[<p>[quote=&quot;drakon&quot;]</p>
<blockquote>
<p>(obwohl es eine wirkliche O(nlogn) Variante von Quicksort gibt, die hat aber wegen eine kompilzierten Pivotwahl eine extrem hohe Konstante und wird daher nicht eingesetzt)</p>
</blockquote>
<p>Was soll das heissen. ein O( n* log n) mit einer hohen Konstante ist bei<br />
großen Eingabedaten immer noch besser als ein O(n^2) denk ich mal <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928138</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928138</guid><dc:creator><![CDATA[blurry333]]></dc:creator><pubDate>Sun, 18 Jul 2010 15:11:14 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 15:14:35 GMT]]></title><description><![CDATA[<p>blurry333 schrieb:</p>
<blockquote>
<p>drakon schrieb:</p>
<blockquote>
<blockquote>
<p>(obwohl es eine wirkliche O(nlogn) Variante von Quicksort gibt, die hat aber wegen eine kompilzierten Pivotwahl eine extrem hohe Konstante und wird daher nicht eingesetzt)</p>
</blockquote>
</blockquote>
<p>Was soll das heissen. ein O( n* log n) mit einer hohen Konstante ist bei<br />
großen Eingabedaten immer noch besser als ein O(n^2) denk ich mal <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
</blockquote>
<p>Ja, aber es müssen seeehr grosse Eingabemengen sein. So gross (ich kann keine Zahlen nennen), dass es nicht real ist. Im übrigen haben wir ja gute O(nlogn) Sortieralgorithmen wie Mergesort oder Heapsort, welche bessere Konstanten haben als die Quicksort Variante.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928142</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928142</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Sun, 18 Jul 2010 15:14:35 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 15:20:20 GMT]]></title><description><![CDATA[<p>von welcher Konstante sprichst du ?<br />
Muss ja sehr groß sein <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>also meine obige konstante 1.5 muss stimmen.</p>
<p>ist sie beim heapsort wohl &lt; 1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928144</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928144</guid><dc:creator><![CDATA[blurry333]]></dc:creator><pubDate>Sun, 18 Jul 2010 15:20:20 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 15:40:35 GMT]]></title><description><![CDATA[<p>blurry333 schrieb:</p>
<blockquote>
<p>tatsächlich:</p>
<p>Hab hier 2 Formel für den average case:</p>
<p>Quicksort: 1.5 * (n*log n)<br />
Selection Sort : 0.25 * n^2 .</p>
<p>bei n=8 z.B. ist selection sort besser.</p>
<p>Frag mich grad wo die Grenze ist. z.B. n=100 ist quicksort besser</p>
</blockquote>
<p>Ich hoffe mal, dein log ist ein ld.<br />
Also 1.5 * (n*log n) = 0.25 * n^2<br />
Dann sagt der Taschenrechner n=1.148<br />
edit: Taschenrechner (fx-991ES) kann's nicht.</p>
<p>Deine Formeln sind mir unheimlich. Und dran glauben tue ich auch nicht.<br />
Die Grenze, ab der man Insertion Sort statt Quicksort nehmen sollte, kann man nicht allgemein sagen. Aber wenn sie zwischen 20 und 50 legt, ist man gut dabei.<br />
Selection Sort nimmt man nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928145</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928145</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Sun, 18 Jul 2010 15:40:35 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 15:31:33 GMT]]></title><description><![CDATA[<p>ähm setz doch mal n=8 ein. Dann siehst du das Selection sort besser ist. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Die grenze muss über 8 sein .</p>
<p>Ja zur Basis 2 <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Zitat:</p>
<p>Selection Sort nimmt man nicht.</p>
<p>Warum ? Man hat wenig Kopierarbeit</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928147</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928147</guid><dc:creator><![CDATA[blurry333]]></dc:creator><pubDate>Sun, 18 Jul 2010 15:31:33 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 15:33:15 GMT]]></title><description><![CDATA[<p>Die Grenze liegt wohl bei 30 <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
hab ich jetzt mal probiert. Keine Ahnung wie man das mathematisch macht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928151</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928151</guid><dc:creator><![CDATA[blurry333]]></dc:creator><pubDate>Sun, 18 Jul 2010 15:33:15 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 15:49:41 GMT]]></title><description><![CDATA[<p>blurry333 schrieb:</p>
<blockquote>
<p>von welcher Konstante sprichst du ?<br />
Muss ja sehr groß sein <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
also meine obige konstante 1.5 muss stimmen.<br />
ist sie beim heapsort wohl &lt; 1</p>
</blockquote>
<p>´Mal rechnen. Die Konstante nenne ich k.<br />
k*n*ln(n)=n^2 |/n<br />
k*ld(n)=n<br />
k=n/ln(n)</p>
<p>Die Formel kenne ich doch irgendwoher...<br />
Oh, wenn man k hat, muß man sich nur die k-te Primzahl suchen und weiß ungefähr, ab welchem n Quicksort schneller ist.<br />
k=1000000 =&gt; n=16626508,9 (das hier kann der Taschenrechner komischerweise wieder)<br />
Kann jemand zum Vergleich mal die millionste Primzahl rausfinden und danebenstellen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928155</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928155</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Sun, 18 Jul 2010 15:49:41 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 15:57:54 GMT]]></title><description><![CDATA[<p>Zwischenstand:</p>
<p>0,89= 1/n * 2^n</p>
<p>wie löst man das ??</p>
<p>ups das kann nicht stimmen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928164</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928164</guid><dc:creator><![CDATA[blurry333]]></dc:creator><pubDate>Sun, 18 Jul 2010 15:57:54 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 16:19:00 GMT]]></title><description><![CDATA[<p>Weit komme ich auch nicht.<br />
1.5 * n * ld(n) = 0.25 * n^2<br />
6 * n * ld(n) = n^2<br />
6 * n * ln(n)/ln(2) = n^2<br />
6 * ln(n)/ln(2) = n<br />
6/ln(2) = n/ln(n)</p>
<p>Riecht nach <a href="http://de.wikipedia.org/wiki/Lambertsche_W-Funktion" rel="nofollow">http://de.wikipedia.org/wiki/Lambertsche_W-Funktion</a></p>
<p>Aber mit der bin ich total ungeübt.</p>
<p>Und jetzt sagt der Taschenrechner n=29.21048705, durch das Umformen ist es für ihn wohl einfacher geworden.<br />
1.5 * n * ld(n) = 213.31<br />
0.25 * n^2 = 213.31<br />
Ok, stimmt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928169</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928169</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Sun, 18 Jul 2010 16:19:00 GMT</pubDate></item><item><title><![CDATA[Reply to Insertion Sort on Sun, 18 Jul 2010 20:50:35 GMT]]></title><description><![CDATA[<p>Für sowas ist wolframalpha praktisch: <a href="http://www.wolframalpha.com/input/?i=6%2Fln%282%29+%3D+n%2Fln%28n%29+" rel="nofollow">http://www.wolframalpha.com/input/?i=6%2Fln(2)+%3D+n%2Fln(n)+</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1928316</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1928316</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Sun, 18 Jul 2010 20:50:35 GMT</pubDate></item></channel></rss>