Superb Logic in java and Python(Heap concept)
\n\n# Superb Solution in JAVA\n\nclass Solution {\n    public int maximumProduct(int[] nums) {\n      Arrays.sort(nums);\n      int n=nums.length;\n      return
\n\n# Superb Solution in JAVA\n```\nclass Solution {\n    public int maximumProduct(int[] nums) {\n      Arrays.sort(nums);\n      int n=nums.length;\n      return Math.max(nums[0]*nums[1]*nums[n-1],nums[n-1]*nums[n-2]*nums[n-3]);  \n    }\n}\n```\n# Excellent Solution in Python Using Heap Concept\n```\nclass Solution:\n    def maximumProduct(self, nums: List[int]) -> int:\n      nums.sort()\n      pos=heapq.nlargest(3,nums)\n      neg=heapq.nsmallest(2,nums)\n      return max(neg[0]*neg[1]*pos[0],pos[-1]*pos[-2]*pos[-3])\n```
['Heap (Priority Queue)', 'Java', 'Python3']