JAVA | Simple Solution | Sorting | Recursion
\n\tpublic int fillCups(int[] amount) {\n        \n        Arrays.sort(amount);\n\t\t\n        if(amount[2] == 0) return 0;\n\t\t\n        if(amount[1] == 0) re
```\n\tpublic int fillCups(int[] amount) {\n        \n        Arrays.sort(amount);\n\t\t\n        if(amount[2] == 0) return 0;\n\t\t\n        if(amount[1] == 0) return amount[2];\n        else {\n\t\t\n            amount[1] -= 1;\n            amount[2] -= 1;\n            return 1 + fillCups(amount);\n        }\n    }\n```
['Recursion', 'Java']