Beats 100% in time || Priority queue C++ code
\n\n# Code\n\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        priority_queue<int> pq;\n        for(int i=0; i<3; i++){\n            
\n\n# Code\n```\nclass Solution {\npublic:\n    int fillCups(vector<int>& amount) {\n        priority_queue<int> pq;\n        for(int i=0; i<3; i++){\n            pq.push(amount[i]);\n        }\n        int time=0;\n        while(pq.top() != 0){\n            time += 1;\n            int temp = pq.top()-1;\n            pq.pop();\n            int temp2 = pq.top()-1;\n            pq.pop();\n            pq.push(temp);\n            pq.push(temp2);\n        }\n        return time;\n    }\n};\n```
['Heap (Priority Queue)', 'C++']