Re: [algogeeks] Remove duplicates from min-heap.

2012-07-16 Thread Guneesh Paul Singh
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

[algogeeks] Remove duplicates from min-heap.

2012-07-14 Thread Navin Kumar
-- 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/-/lZRdyZn85fcJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this

[algogeeks] remove duplicates

2012-03-17 Thread rahul sharma
guys do we have algo to remove duplicates in o(n) time and in spce comepexity 0(1)...in unsorted...array or string.??? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To

[algogeeks] remove duplicates from array

2011-10-02 Thread rahul sharma
1. remove duplicates from array when it is sorted..o(n)tym and o(1) space.. 2. remove duplicates from array when it is not sorted..o(n)tym and o(1) space.. i can tget these from archives...if anybody earlier asked then plz post me the link of thtaif not then rovide me with sol of