- 07/13/2019 at 9:07 pm #1440024EduGorillaKeymasterSelect Question Language :
Suppose that you are given ‘n’ red and ‘n’ blue water jugs, all of different shapes and sizes. All red jugs hold different amounts of water, as do the blue ones. Moreover, for every red jug, there is a blue jug that holds the same amount of water, and vice versa Your task is to find a grouping of the jugs into pairs of red and blue jugs that hold the same amount of water. Assume that a comparison takes one time unit. Your goal is to find an algorithm that makes a minimum number of comparisons to determine the grouping. Remember that you may not directly compare two red jugs or two blue jugs.
What will be the number of comparisons of the best algorithm ?
Post your Training /Course EnquiryAre You looking institutes / coaching center for
- IIT-JEE, NEET, CAT
- Bank PO, SSC, Railways
- Study Abroad