Maximize sum of K pairs made up of elements that are equidistant from both ends of the array
Given an array arr[] consisting of N integers and an integer K, the task is to find the maximum sum of K pairs of the form (arr[i], arr[N - i - 1]), where (0 ? i ? N - 1). Examples: Input: arr[] = {2, -4, 3, -1, 2, 5}, K = 2Output: 9Explanation: All possibles pair of the form (arr[i], arr[N - i + 1]