I don't understand another test case 1, 1, 12


  • -2
    Y

    I don't understand another test case, input 1, 1, 12, expected false. We could fill two jugs and empty them for 6 times to measure 12. I think expected value should be true.


  • 0
    S

    The description has updated already. "If z liters of water is measurable, you must have z liters of water contained within one or both buckets by the end."

    It means the size of water eventually remains in both of the jugs. For case 1, 1, 12, the biggest size will be left in both of jugs is 1+1 = 2. That's why the expected value is false.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.