I had a few interesting ones for my current job. Most of you should of hear it by now, but still a decent brainteasers.

You have 9 pool balls, 1 of which is slightly heavier than the other. You have a balance scale, find the heavier ball. You can only use the scale twice.

Devs, let's not spoil this by actually posting the answer.

  • 10
    Great question! I think I got it :)
  • 2
    Hopefully they're all heavier then your stress ball ๐Ÿ™ƒ
  • 17
    I personally hate those brain-teaser questions because I'm already nervous in the interview and that is making me think of THE solution (rather than a solution) on the spot... not necessarily something you need to do as a developer, where you can sit alone, draw things out, use trial and error and so on.

    To me to understand a developers way of thinking, it is better to give them a take home programming assignment. If the code looks good the next interview round will be questioning them on it. why they wrote the code a certain way. To me that simulates real life job examples more accurately.
  • 6
    Throw them on water, see which one floats less...

    (I know the right answer, btw xD)
  • 3
    I think I got the answer... but I will never know if im right or wrong because I don't want to possibly spoil anything
  • 2
    Got it but I don't think it should be used in interviews.
  • 16
    I just decently googled the question & found an answer. โœŒ
  • 11
    @A-0-C the true dev solution.
  • 5
    Coming from a pool player the cue ball is heavier cause of the magnet in the center.

    but yes i got it
  • 1
    @jckimble, that's some good GK to have. Thank you for the info.
  • 1
    @TheBardAbaddon could always Google it.
  • 1
    Nice riddel. I got the answer.
  • 0

    It's the white ball, the cue ball. ๐Ÿ˜‰
  • 1
    Oh I got a variation involving bags of gold nuggets... (for Goldman Sachs, just realized the irony...)

    There also one of these for testing vials for poison and that one involves multithreading because each results comes back in a few days but you have multiple test papers so what's the shortest time?
  • 9
    I love how this riddle's solution is completely based upon the assumption that indeed only one ball is heavier than the others and that the amount of balls remains the same.

    As we developers know, our inputs can always and totally be trusted.

    I would question the company why they are using usingโ€‹ outdated technology such as balancing scales, and if they are planning to upgrade on some decent electronic scale.

    If I am indeed stuck with the ballance scale I would challenge the arbitrary limit of only being able to use it twice and that I don't trust only one ball to be heavier. Maybe theyโ€‹ are all of the same weight, and still the “smart” solution will find its seemingly heavier one.

    I want to solve business problems, and not find hacky workarounds for their limiting infrastructure that only work in idealized circumstances.

    Gosh, I hate riddles at job interviews.
  • 0
    Never heard before, fairly simple though rly.
Add Comment