Returns an iterator for traversing all elements in the min-heap.
Note: The traversal follows the order of the underlying array, not the priority order.
The type of min-heap array.
The min-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 min-heap.
Note: The traversal follows the order of the underlying array, not the priority order.