how do you extract a sorted array from a Max and a Min heap.

For example If someone is looping through a very very long array and at
every step you want to get a sorted array of elements, it is better not to
sort every time. Although it is easier to maintain a Min-Heap and Max-Heap.
But how do you obtain a sorted array from a Min Heap and Mx-Heap?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CABaJBvKvZ8M_EB8_imLoEvdEsa4uUT%3DnQuvzN5ZGft_t3rYzsw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to