Mental Model
When adding a new number to a heap, we place it at the end and then move it up until the heap rules are true again.
Analogy: Imagine adding a new player to a team lineup where the best players stand at the front. You add the new player at the end and then let them move forward if they are better than the player in front of them.
Heap as array: [10, 15, 20, 17, 25] Insert 13 at end: [10, 15, 20, 17, 25, 13] Index positions: [0, 1, 2, 3, 4, 5]
