Sum of Middle Elements of Two Sorted Arrays using JavaScript
Given 2 sorted arrays Array1 and Array2 of size n each. Merge the given arrays and find the sum of the two middle elements of the merged array. Example: Input: array1 = [1, 3, 5] array2 = [2, 4, 6] n = 3 Output: 7 Explanation: Given two sorted arrays ar1 and ar2 of size n each: ar1 = [1, 3, 5] and a