JAVA EASY SOLUTION
JAVA EASY SOLUTION\n\n First find max and smax elements \n Reduce max and smax and increase the time\n* Return the time\n\n\nclass Solution {\n    public int fi
**JAVA EASY SOLUTION**\n\n* First find max and smax elements \n* Reduce max and smax and increase the time\n* Return the time\n\n```\nclass Solution {\n    public int fillCups(int[] amount) {\n        \n        int sec = 0;\n    \n        while(amount[0] > 0 || amount[1] > 0 || amount[2] > 0){\n            \n            int fmax = (amount[0] > amount[1]) ? (amount[0] > amount[2]) ? 0 : 2 : (amount[1] > amount[2]) ? 1 : 2; \n            int smax = (amount[0] > amount[1]) ? (amount[0] > amount[2]) ? (amount[1] > amount[2]) ? 1 : 2 : 0 : (amount[1] > amount[2]) ? (amount[0] > amount[2]) ? 0 : 2 : 1;\n            \n            amount[fmax]--;\n            amount[smax]--;\n            \n            sec++;\n        }\n        \n        return sec;\n    }\n}```
['Java']