A great friend of mine recently sat for an interview. He was asked a question which has fascinated me since some days now. It is
Consider you have 100 balls which look the same but one out of them is either heavier or lighter than the rest . You are given a beam balance , then find out in minimum how many steps can you determine which ball is the odd one out?
The question is what is the solution to this problem? I can do this in 7 moves. Can we do anything better than it. How would one solve the generalized case of $100$ balls and $n$ of different weight ?