Company: Swiggy
Difficulty: medium
Merge Arrays A number of bids are received for a project. Determine the number of distinct pairs of project costs where their absolute difference is some target value. Two pairs are distinct if they differ in at least one value. Function Description Complete the function mergeArrays in the editor below. The function is expected to return an INTEGER_ARRAY . The function accepts the following parameters: vector<int> a : a sorted array of integers vector<int> b : a sorted array of integers Returns: vector<int> : an array of all the elements from both input arrays in non-decreasing order. Input Format The first line consists of an integer n , denoting the number of line segments. The next n lines consist of four space-separated integers (x 1 , y 1 , x 2 , y 2 ) denoting the x , y coordinates of starting and ending points of the line segments. Output Format Return a single integer representing the maximum closed area. Constraints 3 ≤ n ≤ 10 5 0 ≤ projectCosts[i] ≤ 2 × 10 9