Oracle

  www.oracle.com
Work in HR? Unlock Free Profile

Oracle Senior Software Engineer Interview Question

I interviewed in Redwood City, CA and was asked:
"You have 10 boxes of balls (each ball weighing exactly10 gm) with one box with defective balls (each one of the defective balls weigh 9 gm). You are given an electronic weighing machine and only one chance at it. How will find out which box has the defective balls?"
Add Tags [?]
Answer

Part of a Senior Software Engineer Interview Review - one of 1,232 Oracle Interview Reviews

Answers & Comments

1
of 1
vote

Take 1 ball out of the 1st box, 2 balls out of the 2nd, 3 balls out of the 3rd, etc.... and then weigh all of the balls. Then take the total weight = 10*total number balls + x. Solve for x and that will tell you which box is defective.

- devpaul on Mar 7, 2013

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.