Driver code
public static void main ( String [ ] args ) { int a [ ] = { 1 , 1 , 2 , 2 , 1 , 3 , 3 } ; int n = a . length ; if ( ContinuousElements ( a , n ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }