Maximize sum of products at corresponding indices in two arrays by reversing at most one subarray in first Array
Given two arrays A and B of size N, the task is to maximize the sum of A[i]*B[i] across all values of i from 0 to N-1 by reversing at most one subarray of array A. Examples: Input: N = 4, A = [5, 1, 2, 3], B = [1, 4, 3, 2]Output: 33Explanation: Array A after reversing the subarray A[0, 1] will becom