Find the odd ball among eight balls
You are given eight balls that look exactly the same, and a balance to weigh them against each other. Find the odd ball by weighing only twice?
Problem Statement
The very nice people at the awesome company interview take you to the courtroom where there are eight basketballs that look exactly identical. There's a balance there (a balance is an analog scale that tells you if two objects weight the same. See Lady Justice .)
One of the balls is odd in that it's filled with a slightly heavier gas than regular air.
Getting to an actual interview depends on passing this screening test, in which they've asked you to find the odd ball without using the balance more than twice.
Go!
Evaluation
Get it right without hints (100%)
Solution
Hint 1
If the question seems wrong, it's often because your solution is wrong.
Hint 2
How often have I said to you that when you have eliminated the impossible, whatever remains, however improbable, must be the truth?
Sherlock Holmes
Hint 3
What if there were 6 balls?
References
Microsoft recruiter screening question back in the old days
Recommended reading

Getting paid for seven days with a single bar of gold
An employer hires you to work for 7 days and has a gold bar with 7 segments to pay you with. How do you get them to not break it to pieces?

Prisoner's Dilemma With Blindfolds: a math teaser
Seven people are blindfolded and given unique colored hats at a roundtable. How should they cooperate for at least one to guess her own color?

Reverse the order of the words in a String inplace.
Reverse the order of the words in a String inplace.

MapReduce parallel processing of all known URLs for median length
You are given the data set of all Google crawled URLs on the Internet  that's a very large set. Write an algorithm to find the median URL length.
 Author
 Amin Ariana
 Published
 January 2014