int func(int x)
{
int y=(1<<i)+(1<<j);
int z=x&y; // if after bitwise and ..we get power of 2 then ...
we have to flip the bits..
if((z&(z-1))==0)
return(x^y);
else
return x;
}
With regards,
Praveen Raj
DCE-IT
9999735993
[email protected]
>
>
--
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.