<?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[geordnete Liste]]></title><description><![CDATA[<p>Ich suche einen Container, der Elemente des Typs vector&lt;int&gt; aufnimmt und sortiert ist nach der Länge der vectoren. Einfügen und Löschen soll in O(1) gehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/338906/geordnete-liste</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 01:14:42 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/338906.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 20 Jul 2016 06:21:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to geordnete Liste on Wed, 20 Jul 2016 06:21:38 GMT]]></title><description><![CDATA[<p>Ich suche einen Container, der Elemente des Typs vector&lt;int&gt; aufnimmt und sortiert ist nach der Länge der vectoren. Einfügen und Löschen soll in O(1) gehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2502827</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2502827</guid><dc:creator><![CDATA[saddsa]]></dc:creator><pubDate>Wed, 20 Jul 2016 06:21:38 GMT</pubDate></item><item><title><![CDATA[Reply to geordnete Liste on Wed, 20 Jul 2016 07:00:20 GMT]]></title><description><![CDATA[<p>Suchst du ggf. so ein Konzept, wie es auch bei <a href="https://de.wikipedia.org/wiki/Bucketsort" rel="nofollow">Bucket-Sort</a> verwendet wird? Also mach einen Vector, der für jede verfügabare Länge wiederum eine Kollektion von vector&lt;int&gt; enthält.</p>
<p>Zumindest bekommst du so Einfügen in O(1) hin. Löschen hängst dann aber davon ab, wie viele andere Vectoren gleicher Länge zuvor eingefügt wurden.</p>
<p>Die andere Frage ist natürlich, ob man das will... Wie groß ist denn die Länge deiner Vectoren und wie viele sind es? Oder ist die Frge rein akademisch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2502833</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2502833</guid><dc:creator><![CDATA[wob]]></dc:creator><pubDate>Wed, 20 Jul 2016 07:00:20 GMT</pubDate></item><item><title><![CDATA[Reply to geordnete Liste on Wed, 20 Jul 2016 08:47:33 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">using ivec = vector&lt;int&gt;;
struct Cmp { 
  bool operator()(const ivec &amp;lhs, const ivec &amp;rhs) const
  { return lhs.size() &lt; rhs.size(); }
};
set&lt;ivec, Cmp&gt; S;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2502843</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2502843</guid><dc:creator><![CDATA[versionsnummer]]></dc:creator><pubDate>Wed, 20 Jul 2016 08:47:33 GMT</pubDate></item><item><title><![CDATA[Reply to geordnete Liste on Wed, 20 Jul 2016 09:02:21 GMT]]></title><description><![CDATA[<p>O(1)<br />
lol</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2502846</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2502846</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Wed, 20 Jul 2016 09:02:21 GMT</pubDate></item><item><title><![CDATA[Reply to geordnete Liste on Wed, 20 Jul 2016 10:50:42 GMT]]></title><description><![CDATA[<p>Einfügen in O(1) geht wohl nicht. O(log(n)) sollte reichen.</p>
<p>Löschen in O(1) sollte aber gehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2502861</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2502861</guid><dc:creator><![CDATA[saddsa]]></dc:creator><pubDate>Wed, 20 Jul 2016 10:50:42 GMT</pubDate></item><item><title><![CDATA[Reply to geordnete Liste on Wed, 20 Jul 2016 11:07:45 GMT]]></title><description><![CDATA[<p>wob schrieb:</p>
<blockquote>
<p>Suchst du ggf. so ein Konzept, wie es auch bei <a href="https://de.wikipedia.org/wiki/Bucketsort" rel="nofollow">Bucket-Sort</a> verwendet wird? Also mach einen Vector, der für jede verfügabare Länge wiederum eine Kollektion von vector&lt;int&gt; enthält.</p>
</blockquote>
<p>Gute Idee, zumal ich eine obere Schranke für die Längen habe, die ca. 10 ist. Das wäre dann O(1).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2502864</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2502864</guid><dc:creator><![CDATA[saddsa]]></dc:creator><pubDate>Wed, 20 Jul 2016 11:07:45 GMT</pubDate></item></channel></rss>