Share my python solution: one pass, O(n) time O(1) space
\n        max1,max2,max3,min1,min2 = float('-Inf'),float('-Inf'),float('-Inf'),float('Inf'),float('Inf')\n        for num in nums:\n            if num >= max1:\
```\n        max1,max2,max3,min1,min2 = float('-Inf'),float('-Inf'),float('-Inf'),float('Inf'),float('Inf')\n        for num in nums:\n            if num >= max1:\n                max3,max2,max1 = max2,max1,num\n            elif num >= max2:\n                max3,max2 = max2,num\n            elif num > max3:\n                max3 = num\n            if num <= min1:\n                min2,min1 = min1,num\n            elif num < min2:\n                min2 = num\n        return max(max1*max2*max3,min1*min2*max1)\n```\nNo need to sort but more typing~
[]