We have a scale and 7 balls. 1 ball is heavier than all the
rest. How to determine the heaviest ball with only 3
possible weighing attempts?
Answer Posted / kanishka sukumar
select 2 random groups of 3 balls and after weighing them
1.if equal
the one not weighed is heaviest
else
measure any 2 balls of the heavier group
2. if equal
the one not weighed is heaviest
else
the heavier one is the heaviest
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
Why is oop useful?
What is the renewal class?
What is an example of genetic polymorphism?
Can we create object of abstract class?
Why is there no multiple inheritance?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< What type of loop is a for loop? There are two base class B1,B2 and there is one class D
which is derived from both classes,
Explain the flow of calling constructors and destructors
when an object of derived class is instantiated. What is data binding in oops? What is static modifier? What is the difference between encapsulation and polymorphism? What is polymorphism give a real life example? What does oop mean in snapchat? What is a class oop?