Given two arrays of integers nums1 and nums2, return the total number of valid triplets formed under the following conditions:
Type i, j, k) where i nums1.length and j k nums2.length, such that nums1[i]nums2[j] $ imes$ nums2[k].
Type i, j, k) where i nums2.length and j k nums1.length, such that nums2[i]nums1[j] $ imes$ nums1[k].
Constraints:
nums1.length, nums2.length
nums1[i], nums2[i]
Given two arrays of integers nums1 and nums2, return the total number of valid triplets formed under the following conditions:
Type i, j, k) where i nums1.length and j k nums2.length, such that nums1[i]nums2[j] $ imes$ nums2[k].
Type i, j, k) where i nums2.length and j k nums1.length, such that nums2[i]nums1[j] $ imes$ nums1[k].
Constraints:
nums1.length, nums2.length
nums1[i], nums2[i]