AceTheInterview
Jobs in Pune | Work better in teams | Socialize with friends | Submit Q&A | Tell a friend
Search site for 

Top 100 Interview Questions & Answers in a convenient and easy to read book!

“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”

– Ravi, California

Read more comments...

Interview Questions And Answers RSS Feed

Answers »

  1. Submitted By: Babu Rao — December 23, 2006
    -12 votes
      + -

    Take 4,4,4 coins .
    step1: check for 4 one side & 4 other side in the pan .
    { case : if both are equal , defect in the last 4 .
    step2: check last 4 , in the pan like 2 & 2 both the sides .
    then u wil get the 2 coins with the defect one.
    step 3: then again check for the last 2 like 1 & 1 .
    u wil get the last one .
    }
    if both the 4 & 4 are not equal , then take the defect one , and repeat it from Step 2.

  2. Submitted By: bose O — January 4, 2007
    +0 votes
      + -

    if 4 and 4 are equal, how do you know the defected one since the defective coin is either lighter or heavier and you don’t know the weight of each coin?…..to Babu Rao

  3. Submitted By: bose O — January 4, 2007
    -10 votes
      + -

    i’ll split the coins into 4 groups of 3 coin sets
    ….weight the first two sets and record the weight
    ….weight the second two sets and record the weight
    …any set with a weight different from the other 3 has the defective coin….
    now you know if the defective coin is lighter or heavier
    take the 2 of 3 coins in the defective set…weight them..if equal it means the third coin is defective otherwise…get the heavier / lighter of both coins..depending on result of earlier weighting….

  4. Submitted By: achan — January 5, 2007
    -6 votes
      + -

    coins are named A-L
    step 1: put 3 coins [A-C] on the left and [D-F] on the right.
    if it balances, go to step 2.
    else go to step 3.
    step 2: put the [G-I] on the left and [J-L] on the right.
    the step MUST show one side being heavier.

    the first 2 steps get the heavier side. there r 3 coins in the heavier side. randomly pick 2 and scale again.
    if it balances, then the one not scaled is heavier
    else .. well answer is obvious, isn’t it?

  5. Submitted By: sunith reddy — January 11, 2007
    +4 votes
      + -

    suppose the balls are ABCDEFGHIJKL
    1) weigh ABCD vs EFGH. If equal then the defective piece is in IJKL. Else proceed to 5
    2) DEFG HIJK. If equal then the defective ball is L. then take A and L. Check if L is lighter or heavier. 3 turns. else 3
    3) if HIJK is heavier/lighter then on of IJK is heavier/lighter respectively.
    4) Weigh I vs J. If from 3 you have determined the defective piece to be heavier then the heavier ball is I or J. If they are equal then the heavier ball is K. Same is the case if you have determined that the defective ball is lighter from 3. (3 turns)
    5) DIJH vs EFJK If they are equal then ABC is teh defective set and from 1 we can find out whether it is lighter or heavier dependign on whether ABCD was lighter/heavier. else goto 7.
    6) IWeigh A vs B. if equal then C is the defective ball else whichever is heavier of A and B.
    7) a) if DIJH is lighter than EFAK and ABCD was lighter than EFGH in 1 => D is lighter .
    b) if DIJH is lighter than EFAK and ABCD was heavier than EFGH => either A is heavier or H is lighter. THe 3rd turn will find the defective ball.
    c) if DIJH > EFAK and ABCD > EFGH
    => either D is heavier or one of EF is lighter. Again a third wweighing of E vs F should find the defective ball.
    d) if DIJH > EFAK and ABCD either A is lighter or H is heavier. Again a third weighing of A with B should find the defective ball.
    e) If DIJH == EFAK and ABCD > EFGH
    then either G was heavier or one of B,C was lighter.
    A third weighing of AB vs CD should find the defective ball.
    f) If DIGH == EFAK and ABCD

  6. Submitted By: sunith reddy — January 11, 2007
    -1 votes
      + -

    f) if DIGH == EFAK and ABCD EFGH
    then either G is lighter or one of B,C is heavier . A heavier turn of weighing AB vs CD should identify the defective ball.

    In all 3 turns.

  7. Submitted By: sunith reddy — January 11, 2007
    -1 votes
      + -

    a small correction in the answer no 7
    f) if DIGH == EFAK and ABCD EFGH
    then either G is lighter or one of B,C is heavier . A heavier turn of weighing AB vs CD should identify the defective ball.

    In all 3 turns.

  8. Submitted By: bastin — February 14, 2007
    +10 votes
      + -

    1. Split into 4,4,4 and weight any 2 set

    Case A) if equal, mark 3rd set as x1,x2,x3,x4

    2. weigh x1,x2 Vs x3,S ( s- standard one from group 1 or 2)
    Case A1) if equal, weigh x4 Vs S to find Heavier or lighter.
    Case A2) x1,x2 side is lighter
    means x1,x2 is lighter or x3 is heavier. Weigh x1 Vs X2 to rsolve this.

    Case B : Unequal
    Mark lighter set as L1,L2,L3,L4 and other set as H1,H2,H3,H4

    2. Weigh L1,L2,H1 Vs L3,H2,S
    Gives 3 results
    Equal -> Odd one is L4,H3,H4 (Case B1)
    L1,L2,H1- Lighter -> Odd one is L1,L2 or H2 (Case B2)
    L1,L2,H1 is heavier -> Odd one is H1 or L3(Case B3)

    3. B1-> Weigh H3 Vs H4 to find odd one.
    B2 -> Weigh L1 Vs L2 to find odd one
    B3 -> Weigh H1 VS S to find odd one.

  9. Submitted By: saranya — March 21, 2007
    -6 votes
      + -

    Take 6,6 coins .
    step1: check for 6 one side & 6 other side .
    {then u wil get the 6 coins with the defect one.
    step 2: then again check for the 3 & 3
    u can get one side of the coin heavier/lighter one.
    step 3:then again check the coin 1&1. is any defect inthis we can find .otherwise remaining one coin has defective.
    }

    if both the 4 & 4 are not equal , then take the defect one , and repeat it from Step 2.

  10. Submitted By: saranya — March 21, 2007
    -3 votes
      + -

    Take 6,6 coins .
    a small correction in the answer no 11.
    step1: check for 6 one side & 6 other side .
    {then u wil get the 6 coins with the defect one.
    step 2: then again check for the 3 & 3
    u can get one side of the coin heavier/lighter one.
    step 3:then again check the coin 1&1. is any defect inthis we can find .otherwise remaining one coin has defective.
    }

  11. Submitted By: bethan — May 19, 2007
    -2 votes
      + -

    There are questions like this one that have 9 objects (e.g. coins, balls etc.) to start. If this is the case you have to do the testing in 3 groups of 3 to start. If you have 12 objects to start with (as is the case here) you can do the testing in 2 groups of 6 to start. Correct?

  12. Submitted By: Imad — June 1, 2007
    +3 votes
      + -

    Put the coins into 3 groups:g1, g2, g3.

    Weigh g1 and g2.

    Case 1 :
    If equal, the defected coins is in g3.
    Pick 3 coins from g1 (or g2) and weigh
    them against 3 coins from g3.
    Case 1:
    If equal, the defected coin is the one
    not yet used in g3. Weigh it against
    any coin to find out if it is heavier or
    Lighter.
    Case 2:
    If not equal, the defected coin is one
    of the three coins in g3. From the
    Balance position u can tell if it is
    heavier or lighter.
    Of the 3 (from g3) pick any 2 and
    weigh them. If equal, the 3rd is the
    defected else one of the 2 is the
    defected, use the info from the
    previous weigh (the balance position)
    to find out which is the defected one.

    Case 2:
    If not equal, move 3 coins from g1 to g2
    and replace them with 3 coins from g3. Move
    3 coins from g2 out. Mark all coins.
    Now weigh the g1 and the new g2.
    Case1:
    The two sides balance, in the case
    the defected one is in the 3 taken
    out of g2.
    Case 2:
    The two sides maintian the same
    position as in the first weigh. The
    defected is either the one in g1 that
    was not moved to g2 from the first
    weigh or the one in g2 that was not
    moved out. Use the info from the
    first weigh (balance position) and a
    nondefected coin to determine which
    one is it.
    Case 3:
    The two sides reverse positions as
    compared to the first weigh. The
    defected is …willl …u figure it out

    :):):)

  13. Submitted By: Vishal — August 1, 2007
    -2 votes
      + -

    Divide them in 3 groups with each group having 4 coins and name them as A, B and C. Follow:

    1. Lets take any two pairs like A and B
    2. Weigh them. ONE TIME TURN GONE :(
    3. If they are equal means the heavy coin is in C. Otherwise it might be in B if it is heavier than A or vice-versa. Lets say A=B so we have C.
    4. Divide C into two sub groups like C-a and C-b wiht each having 2 coins
    5. Weigh them. OOPS SECOND TIME TURN IS GONE :(
    6. Take the heavier sub group

    Now among 2 remaining coins and with ONE TIME TURN left anybody can say what is the answer!!!!

  14. Submitted By: Sam — September 10, 2007
    not yet rated
      + -

    scenario1)
    Divide into 4×4x4 and weigh
    if equal then replace three of dirty ones with three clean ones. and balance again. if equal the dirty one left is defective find (heavier or lighter) using the last weight (solved). if not equal you would know at least if it’s heavier or lighter from the second weight and use the last wait to find the defective out of the three dirty coins.(solved)

    scenario2)
    if the first weight is unbalanced. record the direction of each pan (lets assume right pan went up). left rotate three coins from each group and use the second weight.
    a) if there are equal, then we know the defective one was lighter and it’s one of the three we moved outside. use the last weigh to know which one. (solved)
    b) if they are not equal and the right pan still went up. the its either one of the coins we did not rotate. record the direction of the pan and weigh one of them with a good coin. (solved)
    c) if they are not equal and the right pan went down then it’s lighter and it’s one of the dirty three we moved from right to the left pan. use the last weigh to find the defective. (solved) :)

  15. Submitted By: Deepak — October 9, 2007
    -1 votes
      + -

    group it in 5,5 and 2.
    Weigh 5 and 5 –> This will eliminate atleast 7.
    If both are equal then (elimintaes 10)find out the defective out of the two remaining.
    Else,
    from the remaining 5, group it into 3 and 2.
    3 -> wiegh 1 and 1,1
    2- > weigh 1, 1

  16. Submitted By: Buzz — December 6, 2007
    -1 votes
      + -

    Saranya is correct.

    Step 1) You compare 6 and 6, which leaves you with a group of 6 in which you know holds the heaviest. Discard the other 6.

    Step 2) You compare 3 and 3 of your new 6, which leaves you with a group of 3 that holds the heaviest. Discard the other 3.

    Step 3) Take any 2 of the 3 and compare them. If one weighs more that is your answer. If they weight the same, the ball you neglected is heavier.

  17. Submitted By: nam — December 15, 2007
    not yet rated
      + -

    It is not difficult with 12 coins. Can you do the same problem with 13 coins?

  18. Submitted By: Joanna — January 28, 2008
    +1 votes
      + -

    The answer you have posted is incorrect. You answer works only if you know the defect coin is either heavier or lighter.

  19. Submitted By: Anonymous — February 16, 2008
    not yet rated
      + -

    The answer by Buzz is incorrect
    Since, you don’t know how much heavier the defect coin is you NEVER measure them in unequal proportions

    But even if you found out while weighing 2 coins to 1 with the former one is heavier (assuming the defect coin is at least twice heavier than normal ones), you still can’t tell which of the two is heavier since you have used up all 3 times

  20. Submitted By: Rafat Malik Jamal — May 17, 2008
    not yet rated
      + -

    From the aurhor of the question.

    The answers of Mr. Sunith Reddy and Mr. Bastin is correct.

    But that of Mr Bastin is more methodical and logical. My own answer is about 3 times longer.

    Well done to you both. — Rafat Malik Jamal

  21. Submitted By: Sonali — May 28, 2008
    not yet rated
      + -

    The solution goes

    step 1) Divide all coins in 3 sets of 4 coins.
    i.e 4 ,4, 4
    step 2) First :Weigh in the pan 4 coin with the other 4 coins
    if they are same then ,all 8 coins are fair coins
    then last set contain the dirty coin ie 4 coins

    step 3) Second :Weigh any 2 coins frm the last 4 coins ,with any 2 coins frm prevoiusly measure coins(fair coins)

    if they are same then ,other 2 coins have dirty coin

    step 4) Third: take one coin frm the last remaing coins and one coin frm the first weighted coins ,

    if it equal ,then the other coin is the dirty coin
    if it weigh unequal then the same coin is the dirty one(heavior or lighter)

  22. Submitted By: dilip — June 19, 2008
    not yet rated
      + -

    1. 1st weigh 12 coins in two in two pans
    2. the group with difference in weight is again weighed in 2 groups of 3 in two pans
    3. then 2 of the 3 coins r weighed. if they show diff.. then found else the 3rd coin is the culprit

  23. Leave an Answer/Comment

    To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
    Click to hear an audio file of the anti-spam word

Our Sponsors
Our Sponsors
Contact Us | FAQ | Sitemap | Terms of Use | Privacy Policy | Tell a Friend

Copyright © 1999-2006 Jeeve Technologies LLC. All rights reserved.