Count of Pairs in Arrays ‘a’ and ‘b’ with a Greater Sum in ‘a’
Given two arrays a and b of the same size. Find the count of total pair in array a, such that the sum of elements of pair of array a is greater than the sum of elements of the corresponding pair of array b. Example: Input: a={5,7,4,8,11} b={3,6,1,9,13} Output: 6 Explanation: The pairs are (5,7)>(3,6), (5,7)>(3,6), (5,4)>(3,1), (5,8)>(3,9),… Read More »