Function to find maximum subarray sum possible after removing at most one subarray
function maximumSum ( arr , n ) { let preSum = Array . from ( { length : n } , ( _ , i ) => 0 ) ; let sum = 0 ; let maxSum = 0 ;