Given an array with n integers, you need to find if there are triplets (i, j, k) which satisfies following conditions: 0 < i, i + 1 < j, j + 1 < k < n - 1 Sum of subarrays (0, i - 1), (i + 1, j - 1), ...
int right1 = (mid1 + 1 < n) ? arr1[mid1 + 1] : Integer.MAX_VALUE; int right2 = (mid2 + 1 < n) ? arr2[mid2 + 1] : Integer.MAX_VALUE; left2 = arr2[mid2] if mid2 >= 0 ...