Got it.. basically i thought that

1. XOR at bit level is OK.. but for any number a, i was wondering what
would ~a be.. (0?). But actually a XOR b would be nothing but their
corresponding bitwise XORs.

2. Also, a XOR b = a. ~b + ~a.b. Thus if we expand the expression [a
XOR b XOR c.... n numbers] it would give many terms, each having
multiplications of n numbers, i.e. O(n) multiplication, which I thought
is expensive. But then that would be a wrong way to evaluate the
expression; we can easily iteratively find the XOR as mentioned above!


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups-beta.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to