<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>priority queue Archives - Fluent C++</title>
	<atom:link href="https://www.fluentcpp.com/tag/priority-queue/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/tag/priority-queue/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Sun, 18 Mar 2018 19:36:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.4</generator>
<site xmlns="com-wordpress:feed-additions:1">214950964</site>	<item>
		<title>Heaps and Priority Queues in C++ &#8211; Part 1: Heaps Basics</title>
		<link>https://www.fluentcpp.com/2018/03/13/heaps-priority-queues-stl-part-1/</link>
					<comments>https://www.fluentcpp.com/2018/03/13/heaps-priority-queues-stl-part-1/#comments</comments>
		
		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Tue, 13 Mar 2018 01:00:54 +0000</pubDate>
				<category><![CDATA[STL]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[heap]]></category>
		<category><![CDATA[priority queue]]></category>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2883</guid>

					<description><![CDATA[<p>One of our 7 good resolutions for the new year was to learn our data structures. Indeed, using the right data structure simplifies the code, and knowing them lets you understand the code that uses them. Let&#8217;s see two related data structures, heaps and priority queues. This is a deep topic that we are going to [&#8230;]</p>
<p>The post <a href="https://www.fluentcpp.com/2018/03/13/heaps-priority-queues-stl-part-1/">Heaps and Priority Queues in C++ &#8211; Part 1: Heaps Basics</a> appeared first on <a href="https://www.fluentcpp.com">Fluent C++</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>One of our <a href="https://www.fluentcpp.com/2018/01/01/7-good-resolutions-to-write-better-code-this-year/">7 good resolutions for the new year</a> was to <strong>learn our data structures</strong>. Indeed, using the right data structure simplifies the code, and knowing them lets you understand the code that uses them.</p>
<p>Let&#8217;s see two related data structures, <strong>heaps and priority queues</strong>. This is a deep topic that we are going to explore in a mixed series of articles and videos:</p>
<ul>
<li>Part 1: Heaps Basics</li>
<li>Part 2: Building, Unbuilding and Sorting Heaps (video)</li>
<li>Part 3: Queues, Priority Queues and Heaps</li>
<li>Part 4: What Heaps Brings That Priority Queues Don&#8217;t (video)</li>
</ul>
<p>Starting now with <strong>Heaps Basics</strong>.</p>
<h3><span style="color: #ff6600;">What is a heap?</span></h3>
<p>A heap is a data structure that has the form of a tree and that respects the heap property, namely: <strong>every node must be lower than each of its children</strong>.</p>
<p>I suppose that the name &#8220;heap&#8221; comes from the fact that if you pile up a heap of stuff, you&#8217;d rather put the big things at the bottom and the small at the top if you want it to hold:</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-2885" src="https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap.jpg?resize=258%2C406&#038;ssl=1" alt="heaps C++ STL" width="258" height="406" srcset="https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap.jpg?w=258&amp;ssl=1 258w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap.jpg?resize=95%2C150&amp;ssl=1 95w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap.jpg?resize=191%2C300&amp;ssl=1 191w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap.jpg?resize=20%2C32&amp;ssl=1 20w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap.jpg?resize=64%2C100&amp;ssl=1 64w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap.jpg?resize=128%2C201&amp;ssl=1 128w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap.jpg?resize=254%2C400&amp;ssl=1 254w" sizes="(max-width: 258px) 100vw, 258px" data-recalc-dims="1" /></p>
<p>Note that it is completely unrelated to the heap as in the memory region that contains dynamically allocated objects (as opposed to the stack, which happens to also be the name of a data structure too by the way).</p>
<p>One of the most important properties of the heap is that <strong>its lowest element at its root</strong>, to be easily accessible.</p>
<p>In a heap, each node can theoretically have any number of children. But in the STL, heaps&#8217; nodes have two children, so by heap we will designate <strong>binary heaps</strong> in this article.</p>
<h4><span style="color: #ff6600;">Max heaps</span></h4>
<p>The heap property, that every node must be lower than its children, can be generalized to another comparison than &#8220;lower than&#8221; as in <code>operator&lt;</code>. We could use a certain relation that makes more sense for the data type that is in the heap. For instance, a heap of sets could use a lexicographical relationship.</p>
<p>In particular, we can also use the relation <strong>&#8220;greater than&#8221;</strong> in the heap property (which can still be implemented by using <code>operator&lt;</code> by turning around the heap property and ensuring that children are lower than their parents).</p>
<p>Such a heap is called a <strong>max heap</strong>, and this is the sort of heap that the STL has. So by heap I will mean <strong>binary max heap</strong> throughout this article.</p>
<p>In a max heap, <strong>the largest element is at the root.</strong> So here is an example of a heap:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-2887" src="https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=445%2C371&#038;ssl=1" alt="max heap C++ STL" width="445" height="371" srcset="https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?w=445&amp;ssl=1 445w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=150%2C125&amp;ssl=1 150w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=300%2C250&amp;ssl=1 300w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=32%2C27&amp;ssl=1 32w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=120%2C100&amp;ssl=1 120w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=201%2C168&amp;ssl=1 201w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=350%2C292&amp;ssl=1 350w" sizes="(max-width: 445px) 100vw, 445px" data-recalc-dims="1" /></p>
<p>You can see that each node is lower than its parent, and the greatest node (9) is at the root.</p>
<p>Using &#8220;greater than&#8221; gets us away from the metaphor of the heaps of stones/trash/boxes that we can see in the world surrounding us, but hey, do we developers really live in the world surrounding us?</p>
<h3><span style="color: #ff6600;">Implementing a heap</span></h3>
<p>To represent a binary tree such as a heap, one implementation is to make a dynamic allocation for each node, with 2 pointers pointing to its children.</p>
<p>But there is a much more efficient (and elegant) implementation: representing it in the form of an <strong>array</strong>, by doing a <strong>level order traversal</strong> of the heap. Said differently, it means that the array starts with the element at the root, then follows with the children of that root, then all the children of those children. And then the great-grand-children. And so on.</p>
<p>This way, <strong>the greatest element is at the first position of the array</strong>.</p>
<p>This animation illustrates how to above heap could be represented as an array:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-2891" src="https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/ezgif-3-734bb0bf98.gif?resize=434%2C182&#038;ssl=1" alt="heap array C++ STL" width="434" height="182" data-recalc-dims="1" /></p>
<p>This is how the STL represents heaps: a heap can be stored in an <code>std::vector</code> for example, with the elements laid out next to each other like above.</p>
<p>This representation is more efficient than having nodes pointing to each other for several reasons:</p>
<ul>
<li>there is only one dynamic allocation for all the heap, and not one per node,</li>
<li>there is no pointers to children, so no space needed for them,</li>
<li>the contiguous layout of the structure makes it more cache-friendly.</li>
</ul>
<p>This is all well, but we can no longer walk up and down the nodes of the tree, since we have no pointer to children (or parent). Or can we?</p>
<h4><span style="color: #ff6600;">Walking around the heap</span></h4>
<p>It turns out that we can. Indeed, a nice property of binary trees represented as arrays is that, to get to the left child of a node at a certain index <code>i</code>, we can just hop to the index <code>(i + 1) * 2 - 1</code> to get to the left child, and to the index <code>(i + 1) * 2</code> for the right child.</p>
<p><img loading="lazy" decoding="async" class="alignright wp-image-2892 size-medium" src="https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/array_with_index.png?resize=300%2C71&#038;ssl=1" alt="heaps C++ STL" width="300" height="71" srcset="https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/array_with_index.png?resize=300%2C71&amp;ssl=1 300w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/array_with_index.png?resize=150%2C36&amp;ssl=1 150w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/array_with_index.png?resize=32%2C8&amp;ssl=1 32w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/array_with_index.png?resize=250%2C59&amp;ssl=1 250w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/array_with_index.png?resize=201%2C48&amp;ssl=1 201w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/array_with_index.png?resize=350%2C83&amp;ssl=1 350w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/array_with_index.png?w=581&amp;ssl=1 581w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></p>
<p>If those formulae look more like incantations to you, have a look at our heap represented as an array, with indices starting at 1 underneath it:</p>
<p><img loading="lazy" decoding="async" class="size-medium wp-image-2887 alignleft" src="https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=300%2C250&#038;ssl=1" alt="max heap C++ STL" width="300" height="250" srcset="https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=300%2C250&amp;ssl=1 300w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=150%2C125&amp;ssl=1 150w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=32%2C27&amp;ssl=1 32w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=120%2C100&amp;ssl=1 120w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=201%2C168&amp;ssl=1 201w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?resize=350%2C292&amp;ssl=1 350w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/max_heap.png?w=445&amp;ssl=1 445w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" />And compare this with its initial tree-like representation. Notice how the two children of an node at position <code>i</code> are at the position <code>i * 2</code> and <code>i * 2 + 1</code>?</p>
<p>This is true when indices start at 1.</p>
<p>But since in an <code>std::vector</code>, indices start at 0, the left child of a node at position <code>index</code> is located at a position given by:</p>
<pre class="lang:c++ decode:true ">size_t leftChild(size_t index)
{
    return (index + 1) * 2 - 1;
}</pre>
<p>And the position of the right child of a node at position <code>index</code> is given by:</p>
<pre class="lang:c++ decode:true ">size_t rightChild(size_t index)
{
    return (index + 1) * 2;
}</pre>
<p>Let&#8217;s keep those, they will come in handy later in our series on heaps and priority queues.</p>
<h3><span style="color: #ff6600;">Making and checking for heaps with the STL</span></h3>
<p>Now that we&#8217;re clear on the representation of a heap as an array, let&#8217;s see some of the algorithms that the STL offers to manipulate heaps inside arrays.</p>
<h4><span style="color: #ff6600;">Making heaps with <code>std::make_heap</code></span></h4>
<p>If you have a range of objects that can be compared with each other, you can rearrange this range into a max heap with <code>std::make_heap</code>.</p>
<p>Consider the following code to illustrate:</p>
<pre class="lang:c++ decode:true ">std::vector&lt;int&gt; numbers = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};

std::make_heap(begin(numbers), end(numbers));

for (int number : numbers)
{
    std::cout &lt;&lt; number &lt;&lt; ' ';
}
</pre>
<p>This code outputs the new arrangement of <code>numbers</code>:</p>
<pre class="theme:dark-terminal lang:batch decode:true ">9 8 6 7 4 5 2 0 3 1</pre>
<p>Looks familiar? This is our heap implemented as an array!</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-2895" src="https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap_as_array.png?resize=300%2C49&#038;ssl=1" alt="heap as array C++ STL" width="300" height="49" srcset="https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap_as_array.png?resize=300%2C49&amp;ssl=1 300w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap_as_array.png?resize=150%2C24&amp;ssl=1 150w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap_as_array.png?resize=32%2C5&amp;ssl=1 32w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap_as_array.png?resize=250%2C40&amp;ssl=1 250w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap_as_array.png?resize=201%2C33&amp;ssl=1 201w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap_as_array.png?resize=350%2C57&amp;ssl=1 350w, https://i0.wp.com/www.fluentcpp.com/wp-content/uploads/2018/01/heap_as_array.png?w=581&amp;ssl=1 581w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></p>
<h4><span style="color: #ff6600;">Checking for the heap property</span></h4>
<p>Given a collection, it is possible to check whether it is structured as a max heap implemented as an array:</p>
<pre class="lang:c++ decode:true">std::is_heap(begin(numbers), end(numbers))</pre>
<p>returns <code>true</code> if <code>numbers</code> is a max heap and <code>false</code> otherwise. In the previous case for example it would return <code>false</code> before the call to <code>std::make_heap</code> and <code>true</code> after that.</p>
<p>It is possible that only the <strong>beginning of a collection</strong> is structured as a heap. In this case <code>std::is_heap_until</code> returns the iterator pointing to the first position of the collection that does not respect the heap property.</p>
<pre class="lang:c++ decode:true ">auto heapUntil = std::is_heap_until(begin(numbers), end(numbers))</pre>
<p>For example, if the collection is a heap, <code>std::is_heap_until</code> returns the end of the collection. And if the first element is smaller than the second one, it returns its first position since the heap property was broken from the start.</p>
<p>Stay tuned for the follow-up of this series. Next up: Building, Unbuilding and Sorting Heaps with the STL!</p>
<p>Related posts:</p>
<ul>
<li><a href="https://www.fluentcpp.com/2018/03/16/heaps-cpp-stl/">Building, Unbuilding and Sorting Heaps</a></li>
<li>Queues, Priority Queues and Heaps</li>
<li>What Heaps Brings That Priority Queues Don&#8217;t (video)</li>
<li><a href="http://fluentcpp.com/STL">The STL Learning Resource</a></li>
</ul>
Don't want to miss out ? <strong>Follow:</strong> &nbsp&nbsp<a class="synved-social-button synved-social-button-follow synved-social-size-48 synved-social-resolution-single synved-social-provider-twitter nolightbox" data-provider="twitter" target="_blank" rel="nofollow" title="Follow me on twitter" href="https://twitter.com/joboccara" style="font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px"><img loading="lazy" decoding="async" alt="twitter" title="Follow me on twitter" class="synved-share-image synved-social-image synved-social-image-follow" width="48" height="48" style="display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none" src="https://i0.wp.com/www.fluentcpp.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/twitter.png?resize=48%2C48&#038;ssl=1" data-recalc-dims="1" /></a><a class="synved-social-button synved-social-button-follow synved-social-size-48 synved-social-resolution-single synved-social-provider-linkedin nolightbox" data-provider="linkedin" target="_blank" rel="nofollow" title="Find us on Linkedin" href="https://www.linkedin.com/in/jonathan-boccara-23826921/" style="font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px"><img loading="lazy" decoding="async" alt="linkedin" title="Find us on Linkedin" class="synved-share-image synved-social-image synved-social-image-follow" width="48" height="48" style="display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none" src="https://i0.wp.com/www.fluentcpp.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/linkedin.png?resize=48%2C48&#038;ssl=1" data-recalc-dims="1" /></a><a class="synved-social-button synved-social-button-follow synved-social-size-48 synved-social-resolution-single synved-social-provider-rss nolightbox" data-provider="rss" target="_blank" rel="nofollow" title="Subscribe to our RSS Feed" href="https://www.fluentcpp.com/feed/" style="font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px"><img loading="lazy" decoding="async" alt="rss" title="Subscribe to our RSS Feed" class="synved-share-image synved-social-image synved-social-image-follow" width="48" height="48" style="display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none" src="https://i0.wp.com/www.fluentcpp.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/rss.png?resize=48%2C48&#038;ssl=1" data-recalc-dims="1" /></a><br/>Share this post!<a class="synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-facebook nolightbox" data-provider="facebook" target="_blank" rel="nofollow" title="Check out this post from Fluent C++" href="https://www.facebook.com/sharer.php?u=https%3A%2F%2Fwww.fluentcpp.com%2F2018%2F03%2F13%2Fheaps-priority-queues-stl-part-1%2F&#038;t=Heaps%20and%20Priority%20Queues%20in%20C%2B%2B%20%E2%80%93%20Part%201%3A%20Heaps%20Basics&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.fluentcpp.com%2F2018%2F03%2F13%2Fheaps-priority-queues-stl-part-1%2F&#038;p&#091;images&#093;&#091;0&#093;=https%3A%2F%2Fi0.wp.com%2Fwww.fluentcpp.com%2Fwp-content%2Fuploads%2F2018%2F01%2Fezgif-3-8496ad267a.gif%3Ffit%3D450%252C222%26ssl%3D1&#038;p&#091;title&#093;=Heaps%20and%20Priority%20Queues%20in%20C%2B%2B%20%E2%80%93%20Part%201%3A%20Heaps%20Basics" style="font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px"><img loading="lazy" decoding="async" alt="Facebook" title="Check out this post from Fluent C++" class="synved-share-image synved-social-image synved-social-image-share" width="48" height="48" style="display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none" src="https://i0.wp.com/www.fluentcpp.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/facebook.png?resize=48%2C48&#038;ssl=1" data-recalc-dims="1" /></a><a class="synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-twitter nolightbox" data-provider="twitter" target="_blank" rel="nofollow" title="Tweet about this" href="https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.fluentcpp.com%2F2018%2F03%2F13%2Fheaps-priority-queues-stl-part-1%2F&#038;text=Check%20out%20this%20post%20from%20Fluent%20C%2B%2B" style="font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px"><img loading="lazy" decoding="async" alt="twitter" title="Tweet about this" class="synved-share-image synved-social-image synved-social-image-share" width="48" height="48" style="display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none" src="https://i0.wp.com/www.fluentcpp.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/twitter.png?resize=48%2C48&#038;ssl=1" data-recalc-dims="1" /></a><a class="synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-linkedin nolightbox" data-provider="linkedin" target="_blank" rel="nofollow" title="Share on Linkedin" href="https://www.linkedin.com/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.fluentcpp.com%2F2018%2F03%2F13%2Fheaps-priority-queues-stl-part-1%2F&#038;title=Heaps%20and%20Priority%20Queues%20in%20C%2B%2B%20%E2%80%93%20Part%201%3A%20Heaps%20Basics" style="font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px"><img loading="lazy" decoding="async" alt="linkedin" title="Share on Linkedin" class="synved-share-image synved-social-image synved-social-image-share" width="48" height="48" style="display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none" src="https://i0.wp.com/www.fluentcpp.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/linkedin.png?resize=48%2C48&#038;ssl=1" data-recalc-dims="1" /></a><p>The post <a href="https://www.fluentcpp.com/2018/03/13/heaps-priority-queues-stl-part-1/">Heaps and Priority Queues in C++ &#8211; Part 1: Heaps Basics</a> appeared first on <a href="https://www.fluentcpp.com">Fluent C++</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.fluentcpp.com/2018/03/13/heaps-priority-queues-stl-part-1/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2883</post-id>	</item>
	</channel>
</rss>
