<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.omnivision.website/index.php?action=history&amp;feed=atom&amp;title=4.1.2.4_Heaps_%28Min-Heap%2C_Max-Heap%29</id>
	<title>4.1.2.4 Heaps (Min-Heap, Max-Heap) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.omnivision.website/index.php?action=history&amp;feed=atom&amp;title=4.1.2.4_Heaps_%28Min-Heap%2C_Max-Heap%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.omnivision.website/index.php?title=4.1.2.4_Heaps_(Min-Heap,_Max-Heap)&amp;action=history"/>
	<updated>2026-06-10T07:08:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.omnivision.website/index.php?title=4.1.2.4_Heaps_(Min-Heap,_Max-Heap)&amp;diff=216&amp;oldid=prev</id>
		<title>Mr. Goldstein: Created page with &quot;=== 4.1.2.4 Heaps: Finding the Biggest (or Smallest) Fast === Imagine a special pile of toys where the biggest toy is always at the very top, easy to grab. Or, imagine a pile where the smallest toy is always at the top. A &#039;&#039;&#039;heap&#039;&#039;&#039; in computer science is like that special pile! It&#039;s a tree-like data structure (but usually stored in a simple array) that helps you quickly find and grab the largest or smallest item.  Heaps have two main rules:  # It&#039;s a &quot;complete binary tr...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.omnivision.website/index.php?title=4.1.2.4_Heaps_(Min-Heap,_Max-Heap)&amp;diff=216&amp;oldid=prev"/>
		<updated>2025-07-09T15:52:25Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=== 4.1.2.4 Heaps: Finding the Biggest (or Smallest) Fast === Imagine a special pile of toys where the biggest toy is always at the very top, easy to grab. Or, imagine a pile where the smallest toy is always at the top. A &amp;#039;&amp;#039;&amp;#039;heap&amp;#039;&amp;#039;&amp;#039; in computer science is like that special pile! It&amp;#039;s a tree-like data structure (but usually stored in a simple array) that helps you quickly find and grab the largest or smallest item.  Heaps have two main rules:  # It&amp;#039;s a &amp;quot;complete binary tr...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== 4.1.2.4 Heaps: Finding the Biggest (or Smallest) Fast ===&lt;br /&gt;
Imagine a special pile of toys where the biggest toy is always at the very top, easy to grab. Or, imagine a pile where the smallest toy is always at the top. A &amp;#039;&amp;#039;&amp;#039;heap&amp;#039;&amp;#039;&amp;#039; in computer science is like that special pile! It&amp;#039;s a tree-like data structure (but usually stored in a simple array) that helps you quickly find and grab the largest or smallest item.&lt;br /&gt;
&lt;br /&gt;
Heaps have two main rules:&lt;br /&gt;
&lt;br /&gt;
# It&amp;#039;s a &amp;quot;complete binary tree,&amp;quot; which means it&amp;#039;s filled out level by level without any gaps, except possibly at the very last level, which is filled from left to right.&lt;br /&gt;
# It follows a &amp;quot;heap property&amp;quot;:&lt;br /&gt;
#* In a &amp;#039;&amp;#039;&amp;#039;Max-Heap&amp;#039;&amp;#039;&amp;#039;, every parent node is &amp;#039;&amp;#039;larger&amp;#039;&amp;#039; than or equal to its children. So, the biggest item is always at the very top (the root).&lt;br /&gt;
#* In a &amp;#039;&amp;#039;&amp;#039;Min-Heap&amp;#039;&amp;#039;&amp;#039;, every parent node is &amp;#039;&amp;#039;smaller&amp;#039;&amp;#039; than or equal to its children. So, the smallest item is always at the very top (the root).&lt;br /&gt;
&lt;br /&gt;
Heaps are super useful when you need to quickly find the &amp;quot;most important&amp;quot; item (either the biggest or smallest) from a collection, without having to sort the entire collection.&lt;br /&gt;
&lt;br /&gt;
==== Min-Heap ====&lt;br /&gt;
In a &amp;#039;&amp;#039;&amp;#039;Min-Heap&amp;#039;&amp;#039;&amp;#039;, the smallest item is always at the very top (the root node). Every parent node is smaller than or equal to its children. This makes it super fast to find the smallest item in the entire heap.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039; If you&amp;#039;re managing a list of tasks and you always want to work on the task with the &amp;#039;&amp;#039;shortest&amp;#039;&amp;#039; time estimate first.&lt;br /&gt;
&lt;br /&gt;
==== Max-Heap ====&lt;br /&gt;
In a &amp;#039;&amp;#039;&amp;#039;Max-Heap&amp;#039;&amp;#039;&amp;#039;, the largest item is always at the very top (the root node). Every parent node is larger than or equal to its children. This makes it super fast to find the biggest item in the entire heap.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039; If you&amp;#039;re managing a list of priorities and you always want to work on the task with the &amp;#039;&amp;#039;highest&amp;#039;&amp;#039; priority first.&lt;br /&gt;
&lt;br /&gt;
==== Bibliography for Heaps ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Kiddle:&amp;#039;&amp;#039;&amp;#039; [https://kids.kiddle.co/Heap_(data_structure) Heap (data structure) Facts for Kids]&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;GeeksforGeeks:&amp;#039;&amp;#039;&amp;#039; [https://www.geeksforgeeks.org/dsa/binary-heap/ Binary Heap]&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fiveable:&amp;#039;&amp;#039;&amp;#039; [https://library.fiveable.me/key-terms/data-structures/max-heap Max-heap - (Data Structures) - Vocab, Definition, Explanations]&lt;/div&gt;</summary>
		<author><name>Mr. Goldstein</name></author>
	</entry>
</feed>