
nums 배열 3중 순회nums[i] - nums[j]) * nums[k]의 값 연산function maximumTripletValue(nums: number[]): number {
const n = nums.length
let max = 0
for(let i = 0; i < n - 2; i++) {
const numI = nums[i]
for(let j = i + 1; j < n - 1; j++) {
const numJ = nums[j]
for(let k = j + 1; k < n; k++) {
const curVal = (numI - numJ) * nums[k]
max = Math.max(max, curVal)
}
}
}
return max
};