what if the numbers are {0,1,2,3,4,5,6,7} no entry in A1 group!!

anything better than O(n2)??

Best Regards
Ashish Goel
"Think positive and find fuel in failure"
+919985813081
+919966006652


On Mon, Jul 12, 2010 at 3:32 PM, ankur aggarwal <[email protected]>wrote:

> i can give an idea..
> start from the LHS bit.. ( for 3 =*0*101)
>
> divide all numbers in two groups A0and A1 , A1 = 1XXX, A0 = 0XXX form
> we know that an element in A1 xor an element in A0 will give the soln for
> this..
>
> IF either of set is empty then we have to go further like this way
>
> now divide A1 = A10 and A11 such that A11 = 11XX and A10 =10XX
> and so on..
> now XOR of the elements from group A11 and A10 is max or A01 and A00 etc
> this way we can do it..
>
> on each stage i am eleminating some elements..
>
>
> On Mon, Jul 12, 2010 at 12:50 AM, sharad kumar 
> <[email protected]>wrote:
>
>> given a set of numbers
>> u hve to find the pair which give maximum value if we xor that pair
>> ex a={1,3,6,7,8,9}
>> then ans is 15 as 7 xor 8
>>
>> --
>> 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
>
> Ankur Aggarwal
>
>
>  --
> 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.

Reply via email to