Maximize difference between odd and even indexed array elements by shift operations
Given an array arr[] of size N, the task is to maximize the absolute difference between the sum of even indexed elements and the sum of odd indexed elements by left shift or right shift of array elements any number of times. Examples: Input: arr[] = {332, 421, 215, 584, 232}Output: 658Explanation: Convert the array to {233, 421, 152, 845, 223}, Sum