Interview Question

Interview Lenexa, KS

The question was "How do you swap two values without

  creating a new variable?"
Tags:
Answer

Interview Answer

1 Answer

3

I didn't answer the question correctly, but I looked it up later and found it: a = a XOR b b = a XOR b a = a XOR b

Interview Candidate on Mar 8, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.