
Swap the Values of Two Variables Without Using a Third Variable - ajibanda
http://www.ajibanda.com/2012/05/programmers-interview-101-swap-values.html#.T8WzNpEAKKY.hackernews
======
ColinWright
I have to say that I'm upvoting this - it's wonderful.

The real value in this question is to ask a candidate what's wrong with this
article. There are just _so_ many things wrong with it that it's a great
starting place for any number of technical conversations.

This is particularly good:

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

What if b==0? How accurate is it if a and b are floats? So many technical
launching points.

~~~
ajibanda
great find.. I never thought of that..

