Driver program to test above function
int main ( ) { int arr [ ] = { 2 , 3 , 4 , 5 , 6 , 4 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; int k = 1 ; cout << minSize ( arr , n , k ) << endl ; return 0 ; }