we can make a bst of numbers in set a.. then keep increasing count(include
in bst structure) from set b only if already present
finally do a traversal and output those numbers with count equal to 2

On Sat, Jul 3, 2010 at 11:50 AM, divya <[email protected]> wrote:

> If you are given a set of 1000 integers in a set A , and 10,000,000
> integers in a set B, how would you create a set C that would only
> contain numbers that are both in A and B?
>
> i have thought of using Hash.
> is there any other efficient method?
>
> --
> 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].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to