Minimize Array sum by replacing L and R elements from both end with X and Y
Given an array A[] of N integers and 2 integers X and Y. The task is to minimize the sum of all elements of the array by choosing L and R and replacing the initial L elements with X and the R elements from the end with Y. Examples: Input: N = 5, X = 4, Y = 3, A[] = {5, 5, 0, 6, 3}Output: 14Explanati