Returns an iterator for traversing all elements in the max-heap.
Note: The traversal follows the order of the underlying array, not the priority order.
The type of max-heap array.
The max-heap instance.
Optional
If true, the iterator will traverse the heap in reverse order.
true
An iterator yielding heap elements in the specified order.
Returns an iterator for traversing all elements in the max-heap.
Note: The traversal follows the order of the underlying array, not the priority order.