News for hackers. Stuff that matters.
Re:Want a job working on mongoDB? Your first online intervie... by rglullis on Saturday April 23, 2011 @03:48PM (#2477394)
Since you didn't put SPOILER ALERT, I guess it's okay to say that I was going for a similar approach, except that I was going to use sum of elements and the XOR of all elements. I guess the only advantage is that computing the XOR should be faster/smaller space than summing squares.
Re:Want a job working on mongoDB? Your first online intervie... by esrauch on Saturday April 23, 2011 @04:02PM (#2477452)
Your solution won't work because you can't solve for a and b if you are given (a xor b) and (a - b), consider an extra 3 and missing 2 will give 1 for both values, as will extra 5 and missing 4.
Re:Want a job working on mongoDB? Your first online intervie... by rglullis on Saturday April 23, 2011 @04:33PM (#2477529)
Shit, you are right. I was trying to avoid being a victim of nerd sniping on this one, failed at that.