Driver Code
public static void Main ( String [ ] args ) { int [ ] arr = { 6 , 1 , 3 , 3 , 3 , 3 } ; int M = 1 , K = 3 ; int N = arr . Length ; Console . Write ( checkPattern ( arr , M , K , N ) ) ; } }