Technical Interview Question on Puzzles – The Ultimate Balance Puzzle

ultimate-balance-puzzle

The Ultimate Balance Puzzle

There are 12 balls, one of which is different in weight (can be heavier or lighter)

Find the odd ball using less than 3 weightings of the balance

The Solution FlowChart

Assume that the balls are identified as b1, b2, … b12. If we determine that a ball is normal, it will be relabeled ‘N’. If we suspect that a ball could potentially be heavier, let’s add a superscript ‘h’ to its label. If we suspect that a ball could potentially be lighter than normal, let’s add a superscript ‘l’ to its label.

balance-puzzle-solution-flowchart

 

This content was brought to you by CodeGround Online Testing PlatformCodeGround is an online assessment and test evaluation system focused on helping Recruiters in initial screening of potential candidates from an ocean of job seekers in an automated way.

CodeGround supports Online Aptitude TestsSpoken English Communication Skills AssessmentsCoding Contests in JAVA, C, C++, Ruby, Python, JavaScript and PHP.  CodeGround also supports Automated asynchronous interviews. CodeGround Screening Tests can be used by Recruiters during campus hiring or to screen walkin candidates.

Please follow and like us:
0
Share this: