Function that returns the maximum sub - array sum after removing an element from the same sub - array
static int maximizeSum ( int a [ ] , int n ) { int cnt = 0 ; int mini = Integer . MAX_VALUE ; int minSubarray = Integer . MAX_VALUE ;