Jump Trading

  www.jumptrading.com
Work in HR? Unlock Free Profile

Jump Trading Software Developer Intern Interview Question

I interviewed in Chicago, IL and was asked:
"Swap two variables without using a temp."
Add Tags [?]
Answer

Part of a Software Developer Intern Interview Review - one of 23 Jump Trading Interview Reviews

Answers & Comments

0
of 0
votes

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

- Interview Candidate on Apr 11, 2012
0
of 0
votes

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

- AlexB on Sep 18, 2012
0
of 0
votes

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

- HC on Nov 7, 2012

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.