Max Heap: Introduction

This lesson will give a brief introduction to Max-Heaps and how their elements are inserted or removed from Max-Heaps.

Building a Max-Heap

As mentioned in the previous lesson, Max Heaps follow the Max Heap property, which means that the key at the parent node is always greater than the keys at the child nodes. Heaps can be implemented using lists. Initially, elements are placed in nodes in the same order as they appear in the list. Then a function is called over the whole heap in a bottom-up manner that “Max ...

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy