Q.1463 | ☑️One line Python3 solution | EZ💯
\uD83D\uDCA1Intuition\nGrab the two biggest numbers using inbuilt functions, knock them down by one, and bring out the product.\n\n# \uD83E\uDDE0 Approach\n Des
# \uD83D\uDCA1Intuition\nGrab the two biggest numbers using inbuilt functions, knock them down by one, and bring out the product.\n\n# \uD83E\uDDE0 Approach\n<!-- Describe your approach to solving the problem. -->\nIn this solution, the input list nums is first sorted in descending order, and then the top two largest numbers are used to compute the maximum product after subtracting 1 from each.\n\n# \uD83E\uDD72Complexity\n- Time complexity: \uD835\uDC42(\uD835\uDC5Blog\uD835\uDC5B)\n\uD835\uDC42(\uD835\uDC5Blog\uD835\uDC5B) due to the sorting operation. While this solution achieves the correct result in one line, sorting the list hampers the performance compared to an \uD835\uDC42(\uD835\uDC5B).\n\n\n\n- Space complexity: \uD835\uDC42(\uD835\uDC5B)\nAs the sorting operation creates a new list.\n\n# \uD83D\uDCDCCode\n```python3 []\nclass Solution:\n    def maxProduct(self, nums: List[int]) -> int:\n        return ((sorted(nums)[::-1])[0]-1) * ((sorted(nums)[::-1])[1]-1)\n```
['Python3']