C++ Short and Simple O(n) Solution
\nclass Solution {\npublic:\n    int maxProduct(vector<int>& nums) {\n        // Find first max\n        int m1_ind = max_element(nums.begin(), nums.end()) - nu
```\nclass Solution {\npublic:\n    int maxProduct(vector<int>& nums) {\n        // Find first max\n        int m1_ind = max_element(nums.begin(), nums.end()) - nums.begin();\n        int m1 = nums[m1_ind]-1;\n        nums[m1_ind] = 0;\n        // Find second max\n        int m2_ind = max_element(nums.begin(), nums.end()) - nums.begin();\n        \n        return m1 * (nums[m2_ind]-1);\n    }\n};\n```\n**Like it? please upvote...**
['C']