Employeur impliqué
Swapping integers without using additional space
Utilisateur anonyme
a= a(xor)b, b= a(xor)b, a=a(xor)b
a = a + b; b = a - b; a = a - b;
Doesn't work if a and b are 32 bit integer. We might have over flow in a+b. a(xor)b will not have any overflow
Tenez-vous au courant des dernières opportunités et profitez de conseils d’initiés en suivant les entreprises de vos rêves.
Obtenez des recommandations et des mises à jour personnalisées en démarrant vos recherches.