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
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
Do pointers store the address of value or the actual value of a variable?
What are c identifiers?
What are run-time errors?
What extern c means?
What is the difference between exit() and _exit() function?
What is pass by reference in functions?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
What is a newline escape sequence?
What are static variables in c?
Can a variable be both static and volatile in c?
Explain bitwise shift operators?
When do we get logical errors?
What is the stack in c?