Driver code
public static void main ( String [ ] args ) { int a [ ] = { 4 , 1 , 3 , 4 } ; int n = a . length ; if ( isValidSeq ( a , n ) ) System . out . println ( " Valid " ) ; else System . out . print ( " Invalid " ) ; } }