Driver code
public static void Main ( String [ ] args ) { int [ ] a = { 4 , 1 , 3 , 4 } ; int n = a . Length ; if ( isValidSeq ( a , n ) ) Console . WriteLine ( " Valid " ) ; else Console . WriteLine ( " Invalid " ) ; } }