๐ for Heap definition
๐refresher on Binary Trees
React 16
React 15
JS Heap in Chrome
๐ for Heap methods
๐ vs other Data Structures
ย
(and their Complexity)
๐ Practice Time!
๐ pseudocode for methods
Example:
Example:
๐ Why Use A Heap
Used in these Algorithms:
๐ for End of Slides/More Resources
๐Heap Sort and Continuous Median
Given an unsorted array, produce a sorted array using heap sort
ย
First try doing it on top of a complete Heap Sort implementation like here:
https://repl.it/@swyx/Heaps-Basic-Solution
Then practice writing from scratch
ย
Notes
Write a class that can support the following two functionalities: 1) the continuous insertion of numbers and 2) the instant (O(1) time) retrieval of the median of the numbers that have been inserted thus far.
Other Notes