Driver code
int main ( ) { int a [ ] = { 1 , 1 , 2 , 2 , 1 , 3 , 3 } ; int n = sizeof ( a ) / sizeof ( a [ 0 ] ) ; if ( ContinuousElements ( a , n ) ) cout << " Yes " << endl ; else cout << " No " << endl ; return 0 ; }