Azienda coinvolta
How do you swap two integer variables without creating a temporary variable?
Anonimo
int x = 10; int y = 12; x = x+y //x = 22, y = 12 y = x - y //x = 22, y = 10 x = x-y // x= 12, y=10
In python: a, b = b, a
Non lasciarti sfuggire opportunità e informazioni privilegiate seguendo le aziende dove vorresti lavorare.
Ricevi suggerimenti e aggiornamenti personalizzati avviando le tue ricerche.