You are given an integer array nums.
An ordered triplet consists of three indices (i, j, k) such that i j k. The value of such a triplet is evaluated as (nums[i] nums[j]) $ imes$ nums[k].
Return the maximum value among all ordered triplets in nums. If every triplet yields a negative value, return
Constraints:
nums.length
nums[i]
You are given an integer array nums.
An ordered triplet consists of three indices (i, j, k) such that i j k. The value of such a triplet is evaluated as (nums[i] nums[j]) $ imes$ nums[k].
Return the maximum value among all ordered triplets in nums. If every triplet yields a negative value, return
Constraints:
nums.length
nums[i]