What is a binary heap?
What is a binary heap?
Approach: Define complete binary tree with heap property.
A complete binary tree that satisfies the heap property: in a max-heap, for any given node, the value of the node is greater than or equal to the values of its children.
Follow-up: What is the time complexity of 'heapify'?
Key concepts: min-heap, max-heap, complete tree.