Driver Code
int main ( ) { int arr [ ] = { 2 , 3 , 4 , 10 , 4 , 3 , 1 } ; int n = sizeof ( arr ) / sizeof ( int ) ; if ( check ( arr , n ) == true ) cout << " Yes " " STRNEWLINE " ; else cout << " No " << " STRNEWLINE " ; return 0 ; }