This document discusses heaps and their use in implementing priority queues. It describes how a max-heap or min-heap is a complete binary tree that satisfies the heap property, where each internal node is greater than or equal to its children. It explains how a heap can be represented using a simple array and how to build a heap from an unsorted array in O(n) time by sifting nodes down. Deleting the root element and maintaining the heap property takes O(log n) time. Heap sort uses a heap to sort an array in O(n log n) time. Priority queues can be efficiently implemented using max-heaps.