Calculate range of elements that can give maximum possible middle value of the array since index of maximum possible middle value after deleting exactly k elements from array will lie in between low and high
int low = ( n + 1 - k ) / 2 ; int high = ( n + 1 - k ) / 2 + k ;