There are 3 baskets of fruits with worng lables,one basket
has apple,another basket has orange,another has combination
of apple and orange,what is the least way of interchange
the lables.
Answer Posted / nitinbhatia2211
Lets Say Basket as B1, B2, B3 labelled Apple, Orange and
Apple&Orange respectively.
As all the Baskets have wrong labels, we are sure for one
thing that Basket B3 doesn't contain Apples&Orange So we
will first take out the fruit from it. Suppose its Apple
then surely B3 will get its real label i.e. Apple.
And as again we know that the all baskets were wrongly
labelled... interchange the labels of basket B2 and B1.
So finally we have B1, B2 and B3 containing Orange,
Apple&Orange and Apple respectively.
Therefore the least no of ways to find out the correct
labels is ONE only.
| Is This Answer Correct ? | 47 Yes | 4 No |
Post New Answer View All Answers
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
Explain the meaning of keyword 'extern' in a function declaration.
What is call by value in c?
write a program to copy the string using switch case?
Describe the header file and its usage in c programming?
Explain why c is faster than c++?
How is null defined in c?
What math functions are available for integers? For floating point?
What is the difference between far and near in c?
why wipro wase
Explain threaded binary trees?
What is structure of c program?
How can you find out how much memory is available?
Hi can anyone tell what is a start up code?
Is there a way to compare two structure variables?