Easy to Understand Solution | Beats 100% | TC: O(1)  SC: O(1)
Find the cup that will take the maximum time. If its time is greater than the combined time taken by the other cups, then it is the minimum amount of time requi
Find the cup that will take the maximum time. If its time is greater than the combined time taken by the other cups, then it is the minimum amount of time required to fill all three cups.\n\n# Complexity\n- Time complexity: O(1)\n- Space complexity: O(1)\n\n# Code\n```\nclass Solution {\n    public int fillCups(int[] amount) {\n        int max = Math.max(Math.max(amount[0], amount[1]), amount[2]);\n\n        int sum = amount[0] + amount[1] + amount[2];\n\n        if(max >= sum - max){\n            return max;\n        }\n        \n        return (sum + 1)/2;\n    }\n}\n```
['Java']