Re: [algogeeks] Re: 25march

2016-06-07 Thread Tarun Sharma
Check here http://www.writeulearn.com/defective-ball-puzzle/ On Mon, Mar 28, 2011 at 5:54 PM, Subhransu wrote: > Worst Case scenario you will get in 3 steps > > 9 balls > > Compare 1st:123| 456| 789 > if (first > second)

Re: [algogeeks] Re: 25march

2011-03-28 Thread Subhransu
Worst Case scenario you will get in 3 steps 9 balls Compare 1st:123| 456| 789 if (first second) //The ball is in 1st Second compare : else (second third) take the heavy one now you have 3 balls Third compare : lets send is heaver