I think you can use heap. Thanks, Sathaiah
On Wed, Jul 21, 2010 at 12:06 PM, divya <[email protected]> wrote: > Given an array A of N elements, where N approaches infinity, there are > S elements in it where S<<N. WAP to insert an element at A[S] if it > does not exist in A[0....S-1]. > > -- > 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]<algogeeks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- 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.
