✅✅|| EASY PEASY ||  C#, Java, Python || 🔥🔥🔥
Intuition\nThe problem involves finding the maximum product of two elements in an array. The provided code suggests an approach of iteratively updating the two 
# Intuition\nThe problem involves finding the maximum product of two elements in an array. The provided code suggests an approach of iteratively updating the two largest elements in the array as we traverse through it.\n\n# Approach\n1. Initialize two variables, `max1` and `max2`, to store the two largest elements in the array.\n2. Iterate through the array, updating `max1` and `max2` as needed.\n3. Calculate and return the product of `(max1 - 1) * (max2 - 1)`.\n\n# Complexity\n- **Time complexity:** O(n), where n is the length of the array. The algorithm makes a single pass through the array.\n- **Space complexity:** O(1), as the algorithm uses a constant amount of extra space to store `max1` and `max2`.\n\n```csharp []\npublic class Solution {\n    public int MaxProduct(int[] nums) {\n        int max1 = 0, max2 = 0;\n\n        foreach (var num in nums) {\n            if (num > max1) {\n                max2 = max1;\n                max1 = num;\n            } else if (num > max2) {\n                max2 = num;\n            }\n        }\n\n        return (max1 - 1) * (max2 - 1);\n    }\n}\n```\n```python []\nclass Solution:\n    def maxProduct(self, nums):\n        max1, max2 = 0, 0\n\n        for num in nums:\n            if num > max1:\n                max2 = max1\n                max1 = num\n            elif num > max2:\n                max2 = num\n\n        return (max1 - 1) * (max2 - 1)\n\n```\n``` Java []\nimport java.util.Arrays;\n\npublic class Solution {\n    public int maxProduct(int[] nums) {\n        int max1 = 0, max2 = 0;\n\n        for (int num : nums) {\n            if (num > max1) {\n                max2 = max1;\n                max1 = num;\n            } else if (num > max2) {\n                max2 = num;\n            }\n        }\n\n        return (max1 - 1) * (max2 - 1);\n    }\n}\n```\n\n![image name](https://i.imgur.com/JdL5kBI.gif)\n\n- Please upvote me !!!
['Java', 'Python3', 'C#']