Beats 100%🔥|| easy JAVA Solution✅
Code\n\nclass Solution {\n    public int fillCups(int[] nums) {\n        int ans=0;\n        while(true){\n            if(nums[0]<=0 && nums[1]<=0 && nums[2]<=0
# Code\n```\nclass Solution {\n    public int fillCups(int[] nums) {\n        int ans=0;\n        while(true){\n            if(nums[0]<=0 && nums[1]<=0 && nums[2]<=0) break;\n            if(nums[0]>=nums[1] && nums[2]>=nums[1]){\n                ans++;\n                nums[0]--;\n                nums[2]--;\n            }else if(nums[0]>=nums[2] && nums[1]>=nums[2]){\n                ans++;\n                nums[0]--;\n                nums[1]--;\n            }else{\n                ans++;\n                nums[1]--;\n                nums[2]--;\n            }\n        }\n        return ans;\n    }\n}\n```
['Greedy', 'Java']