I think ,Gunjan's solution is right.
suppose {1,2,1,3,2} is given,
1 --- 01
2 ---- 10
3 ----- 11
..
..
..
So XOR these elements 01 XOR 10 -------> 11
11 XOR 01 -------> 10
10 XOR 11 -------> 01
01 XOR 10 -------> 11(3)
So answer is 3.
Any query???????????????
--
Thanks and Regards,
Manish Pathak **
TimesJobs.com
Mo. 9015687266
--
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.