2 Lines of Code-->Powerful Heap Concept
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:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n                        #Math Approach\nclass Solution:\n    def maximumProduct(self, nums: List[int]) -> int:\n        nums.sort()\n        return max(nums[0]*nums[1]*nums[-1],nums[-1]*nums[-2]*nums[-3])\n\n    #please upvote me it would encourage me alot\n\n```\n\n```\n                        #Heap Approach\nclass Solution:\n    def maximumProduct(self, nums: List[int]) -> int:\n        pos=heapq.nlargest(3,nums)\n        neg=heapq.nsmallest(2,nums)\n        return max(neg[0]*neg[1]*pos[0],pos[0]*pos[1]*pos[2])\n    #please upvote me it would encourage me alot\n\n\n
['Python3']