SIMPLE MAX-HEAP C++ SOLUTION
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:o(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:o(n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n\nclass Solution {\npublic:\n    int maxProduct(vector<int>& nums) {\n        // Max-heap to store larger elements in the top \n        priority_queue<int> pq(nums.begin(),nums.end());\n        int max1 = pq.top();\n         pq.pop();\n        int max2 = pq.top();\n         pq.pop();\n        return (max1 - 1) * (max2 - 1);\n    }\n};\n```
['C++']