Function that returns the maximum sub - array sum after removing an element from the same sub - array
function maximizeSum ( a , n ) { let cnt = 0 ; let mini = Number . MAX_VALUE ; let minSubarray = Number . MAX_VALUE ;