How does heapify maintain max-heap property when both children are larger than the root and their children are also greater than their parents?
I am currently learning about heap sort and I am having trouble understanding the heapify process, particularly when both children of the root are larger than the root itself, and the sub-children (children of the children) are also larger than their parents.