Driver Code
int main ( ) { int arr [ ] = { 15 , -3 , 5 , 2 , 7 , 6 , 34 , -6 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; int K = 50 ; Pair * tmp = getSubArray ( arr , n , K ) ; int i = tmp -> f ; int j = tmp -> s ; int minDev = tmp -> t ; if ( i == -1 ) { cout << " The ▁ empty ▁ array ▁ shows ▁ minimum ▁ Deviation " << endl ; return 0 ; } for ( int k = i + 1 ; k < j + 1 ; k ++ ) { cout << arr [ k ] << " ▁ " ; } return 0 ; }