In this episode, I will explain the heap data structure and how the heap sort algorithm works, and how to implement it in C++. Here we will implement 2 main functions as BuildHeap and Heapify to build the data structure we need and to sort an array of numbers using heap sort.