What is a Max-Heap?

preview_player
Показать описание
Max-heaps keep track of their largest element, hence the "Max" portion of the name. This data structure can be used to sort arrays, create priority queues, and keep track of the largest element within a data structure. For example, if you have an array containing stock prices at different times, you may want to keep track of the stock's highest price using a max-heap.

Max-heaps are the opposite of min-heaps (which track the smallest element). My other video shows an example of how a min-heap would be created, be sure to check it out for more information not said in this one!

Please let me know in the comments if you have any questions or other video topics you want me to explore!
Рекомендации по теме
Комментарии
Автор

Wow, that actually explained it easily in a few seconds 😮 👏👏

Roseanne-ntpg