@Navin: A sorted array is a heap. So use the second half of a heap sort 
algorithm to produce the array in sorted order. You can store the sorted 
array backwards in the original array. Then reverse the array and squeeze 
out the duplicates. O(n log n).
 
Dave

On Saturday, July 14, 2012 3:28:29 PM UTC-5, Navin Kumar wrote:

> Remove duplicates from a min-heap.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/0aCpM-WSME0J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to