I think that the above algo will fail for the following two arrays:
a={2,2,3,3}
b={4,4,1,1}
sum(a)=sum(b);
a^b=0;
len(a)=len(b);
Correct me if i am wrong!
Pranav
On Sun, Jul 3, 2011 at 7:43 AM, varun pahwa wrote:
> @aditya. xor all elements mean that. take xor of each element of 1st array
> st
I am not sure about this but a quick thought on the question:
If we give plus a higher precedence than multiplication, then we get a
higher result.
For eg:
3 + 6 * 7 + 3 * 2
BODMAS => 51
But giving plus a higher precedence will imply 180
Unable to think of any counter examples. Give if any, ot