Frage im Vorstellungsgespräch bei Jump Trading

Swap two variables without using a temp.

Antworten zu Vorstellungsgespräch

Anonym

19. Sept. 2012

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

4

Anonym

11. Feb. 2016

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

2

Anonym

24. Nov. 2017

+/- is correct even with overflow

Anonym

8. Nov. 2012

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

Anonym

11. Apr. 2012

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