Function to return the minimum number of operations required to convert the given array to an increasing AP series with common difference as 1
int minOperations ( int arr [ ] , int n ) { int start = ( int ) arr [ n - 1 ] ; int end = * ( max_element ( arr , arr + n ) ) + n ; int max_arr = 0 ;