Dont know whether this is perfect solution but could be a great approach
Assumptions: all numbers are unsigned as given in the link provided by Dipit
If u see a bit arrangement of unsingned numbers having n bits then u will
find that
numbers m ((2^n) - 1- m) (i.e numbers whos addition is 2^n
Given an array of N integers, Find two Numbers with max XOR value.
Naive Algorithm is O(N^2), what can be a better approach ?
--
Sunny Aggrawal
B.Tech. V year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm
http://discuss.joelonsoftware.com/default.asp?interview.11.614716
--
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 unsubscribe from this group, send email to