This function does k operations on array in a way that maximize the array sum . index -- > stores the index of current minimum element for j 'th operation
int maximumSum ( int arr [ ] , int n , int k ) {