Driver code
int main ( ) { int arr [ ] = { 1 , 1 , 2 , 3 } ; int N = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; int K = 3 ; if ( check ( arr , N , K ) ) cout << " Yes " ; else cout << " No " ; return 0 ; }