yaar i can think of only 2 methods for this
1. O(nlogn) o(n) sol
traverse the heap...and hash the elements..if it exist then delete it
2.make another heap but transfering elements from 1st to 2nd heap...if the
element is equal to the last inserted element then discard it
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.