Sollicitatievraag bij Jump Trading

Swap two variables without using a temp.

Antwoorden op sollicitatievragen

Anoniem

19 sep 2012

in c/c++: x^=y^=x^=y;

4

Anoniem

11 feb 2016

a= a*b; b = a/b; a = a/b;

2

Anoniem

24 nov 2017

+/- is correct even with overflow

Anoniem

8 nov 2012

You don't want to use +-/* as you might face under/overflow.

Anoniem

11 apr 2012

Can be done using adding/subtracting, multiply/divide, xor.