The ole 12 snooker ball question (and my job)

  • Context: Undergrad 
  • Thread starter Thread starter seadalton
  • Start date Start date
  • Tags Tags
    Ball Job
Click For Summary
SUMMARY

The discussion centers around a job interview question involving the classic "12 snooker balls" problem, where the goal is to identify the heavier ball using the minimum number of weight measurements. The user, seadalton, initially proposed a linear function of x/4 for the solution, which was deemed inadequate by the interviewer who expected a more sophisticated algorithm. The conversation highlights the importance of algorithmic thinking in technical interviews, particularly for roles that require problem-solving skills.

PREREQUISITES
  • Understanding of algorithm design principles
  • Familiarity with weight measurement techniques
  • Knowledge of binary search concepts
  • Basic problem-solving skills in competitive programming
NEXT STEPS
  • Research the "12 balls problem" algorithm and its optimal solution
  • Learn about divide-and-conquer strategies in algorithm design
  • Explore competitive programming platforms for similar problem-solving exercises
  • Study the principles of algorithm complexity analysis
USEFUL FOR

Software engineers, algorithm enthusiasts, and job seekers preparing for technical interviews that involve problem-solving and algorithmic challenges.

seadalton
Messages
4
Reaction score
0
hello,

I had a job interview today with the ole 12 snooker ball question (a similar question is hosted on this PF site: physicsforums.com/archive/t-40405_12_red_snooker_balls.html ). The interviewer started with an 8 ball scenerio, then we went to 12 balls. In each case I had to sweat out the answer on a white board b/c it wasn't all that obvious to me.

Anywho, the last question from the interviewer for this topic was to create an algorithm for any number of balls to determine the minimum number of weight measurements needed to distingush the heavier ball. My simpleton answer was x/4 because 2 is the minimum measurement for 8 balls and 3 is the minimum for 12 balls. The interviewer thought my formula was pretty funny b/c the answer should have been an algorithm and not linier function. I thought he was pretty funny b/c I'm not working in a pool hall, but that's a different matter.

If you're familiar with the problem and you know the algorithm, could you please post it or send it to me (email address is in my profile).

Gratefully yours,

seadalton
 
Mathematics news on Phys.org
Out of curiosity, what type of job did you apply for that you got that type of question on your interview?
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
7K
  • · Replies 21 ·
Replies
21
Views
8K
Replies
127
Views
24K
Replies
18
Views
6K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 45 ·
2
Replies
45
Views
8K
  • · Replies 80 ·
3
Replies
80
Views
9K
  • · Replies 66 ·
3
Replies
66
Views
8K
Replies
35
Views
11K