Azienda coinvolta
Swap 2 integers without using a temp variable.
Anonimo
He asked me to come up with a method other than bit manipulation.
public void swap(int x, int y) { x = x + y; y = x - y; x = x - y; }
Non lasciarti sfuggire opportunità e informazioni privilegiate seguendo le aziende dove vorresti lavorare.
Ricevi suggerimenti e aggiornamenti personalizzati avviando le tue ricerche.