can somebody explain how you build these trees from scratch and how to insert values? i remember that deletion always takes place at the root but not what happens afterwards. i don't need code just an explanation preferably with these numbers: 2,4,5,6,1,7,8,3,11
Deletion (max-heap): after you remove the root you check for the biggest children to occupy its place. Recurse.
Insertion: Put it at the end. if the heap property is broken, swap it with the father. Recurse.