yeah thanxgot it
this won't work if memory locations of both variables is same
On Fri, Jul 29, 2011 at 1:03 PM, Prem Krishna Chettri wrote:
> http://en.wikipedia.org/wiki/XOR_swap_algorithm
>
> Answer as well as broaden you guys Concept on Memory..
>
> Have a look
>
>
> On Fri, Jul 29, 2011
http://en.wikipedia.org/wiki/XOR_swap_algorithm
Answer as well as broaden you guys Concept on Memory..
Have a look
On Fri, Jul 29, 2011 at 12:54 PM, tech rascal wrote:
> can u give an explanation for ...how xor method fails for same values??
> I think it will work right...
>
>
> On Fri, Jul 29,
can u give an explanation for ...how xor method fails for same values??
I think it will work right...
On Fri, Jul 29, 2011 at 12:26 PM, Prem Krishna Chettri
wrote:
> Replying to all the Above Code.
>
> 1> XOR operation to swap variable are not a solution as it fails for
> swapping of same value r
Replying to all the Above Code.
1> XOR operation to swap variable are not a solution as it fails for
swapping of same value results 0.
2> the Short and Sweet looking various modification of code fails to swap
data when U swap data between two different data type.
So I suggest you all guys to us
@reynald: this won't work for floatsis there any other case u can
think of, where this method won't work??
2011/7/29 A for ♥ღAakasHღ♥
>
> a=(a+b)-(b=a);
>
>
> *Aakash Abhishek Pradhan**
> **MCA Final Year,
> NIT Durgapur*
>
> --
> You received this message because you are subscribed to
a=(a+b)-(b=a);
*Aakash Abhishek Pradhan**
**MCA Final Year,
NIT Durgapur*
--
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
algoge
Try this out, Venkat
a^=b^=a^=b; (XORing)
On Fri, Jul 29, 2011 at 11:09 AM, tech rascal wrote:
> one method is-
> a=a+b;
> b=a-b;
> a=a-b;
>
> is there any other method???
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to t
one method is-
a=a+b;
b=a-b;
a=a-b;
is there any other method???
--
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
algogeeks+unsubs