Easy C++ solution
Intuition\nThe problem requires us to minimize the time needed to fill cups with three different amounts of liquid. The idea is to always try to reduce the two 
# Intuition\nThe problem requires us to minimize the time needed to fill cups with three different amounts of liquid. The idea is to always try to reduce the two largest amounts simultaneously to minimize the total time.\n\n# Approach\n\nInitialization: Start with a counter cnt set to 0.\nLoop until all amounts are zero: Use a while loop to continue until all three amounts are zero.\nDecrement the two largest amounts: In each iteration, identify the two largest amounts and decrement them.\nIncrement the counter: Increase the counter in each iteration to count the time steps.\nReturn the counter: Once all amounts are zero, return the counter as the result.\n\n# Complexity\n\n**Time complexity**: The time complexity is O(nlogn)\n due to the sorting operation inside the loop. However, since the number of elements is fixed at 3, this can be considered as O(1)\n in practical terms.\n**Space complexity**: The space complexity is O(1)\n>  as we are using a fixed amount of extra space.\n# Code\n```cpp []\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        int cnt=0;\n        // sort(amount.begin(),amount.end());\n        while(amount[0]>0||amount[1]>0||amount[2]>0)\n        {\n            if(amount[0]>=amount[2]&&amount[1]>=amount[2])\n            {\n                amount[0]-=1;\n                amount[1]-=1;\n            }\n            else if(amount[0]>=amount[1]&&amount[2]>=amount[1])\n            {\n                amount[0]-=1;\n                amount[2]-=1;\n            }\n            else if(amount[1]>=amount[0]&&amount[2]>=amount[0])\n            {\n                amount[1]-=1;\n                amount[2]-=1;\n            }\n            cnt++;\n        }\n        return cnt;\n    }\n};
['C++']