Java solution with 0ms runtime |  Beats 100% | No Sorting
If you found it easy to understand, Please do upvote :)\nThankyou!!\n-------------------------------------------------------------------------------------------
**If you found it easy to understand, Please do upvote :)\nThankyou!!**\n**---------------------------------------------------------------------------------------------------------------**\n![image](https://assets.leetcode.com/users/images/34f688b9-1fc2-4211-a3ea-f6666f11773d_1670066498.6624825.jpeg)\n\n**---------------------------------------------------------------------------------------------------------------**\n```\nTime Complexity = O(n)\nSpace Complexity = O(1)\n```\n**---------------------------------------------------------------------------------------------------------------**\n```\npublic int maxProduct(int[] nums) \n    {\n        //Declare 2 values & assign them to 0\n        //Its ok to assign zero\n        //Since range of elemnts is given as, 1 <= nums[i] <= 10^3,\n        int winner=0, runner=0;\n        \n\t\t//Now, our task to find the maximum 2 values.\n\t\tfor(int i=0; i<nums.length; i++)\n        {\n            if(nums[i] > winner)\n            {\n                runner = winner;\n                winner = nums[i];\n            }\n            else if(nums[i] > runner)\n            {\n                runner = nums[i];\n            }\n        }\n        \n\t\t//Finally returning the result.\n        return (winner-1) * (runner-1);\n    }\n```
['Java']