Driver code
public static void Main ( string [ ] args ) { int [ ] arr = { 1 , 3 , 4 , 7 , 5 , 3 , 1 } ; int n = arr . Length ; int k = 4 ; if ( checkArray ( n , k , arr ) ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }