On Fri, Jul 2, 2010 at 3:41 PM, jalaj jaiswal <[email protected]>wrote:

> make a bst of all numbers (nlogn)
> include a count in the structure..as soon as the count become n return the
> data of that node
>

Can you please tell me why you chose a bst, simply traversing the array and
incrementing the count would
have also worked in this case and it would have been O(n).



>
>
> On Thu, Jul 1, 2010 at 10:13 PM, sharad <[email protected]> wrote:
>
>> 1.an array of 2n+1 elements is given .....one element is repeated n
>> times
>> and rest all are different.....find the no repeated.
>> 2.same question as above but this time other no's are not
>> different ..i.e
>> they can repeat.
>>
>>
>>
>> --
>> 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.
>>
>>
>
>
> --
> With Regards,
> Jalaj Jaiswal
> +919026283397
> B.TECH IT
> IIIT ALLAHABAD
>
>  --
> 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.
>



-- 
Best Regards
Akash Gangil

-- 
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.

Reply via email to