Aktiver Arbeitgeber
swap two numbers without using temporary variable
Anonym
b=a+b; a=b-a; b=b-a;
Sagar's answer is decent, but there might be problems if they consider overflow. Better is using xor: b = a XOR b a = a XOR b b = a XOR b
Verschaffe dir einen Vorsprung bei Chancen und Insider-Tipps, indem du deinem Traumunternehmen folgst.
Erhalte personalisierte Jobempfehlungen und Updates, indem du Suchanfragen startest.