Returns the number of elements currently in the heap.
Inserts a value into the max heap. This method places the value at the end of the heap and then performs the bubble-up operation to maintain the max-heap property, ensuring that each parent node is greater than or equal to its children.
The value to insert into the heap.
Class representing a Max Heap data structure. A Max Heap is a complete binary tree where each node's value is greater than or equal to the values of its children.