Driver method
public static void Main ( ) { int [ ] arr = { 3 , 2 , 1 , 5 , 6 , 4 } ; int k = 2 ; Console . WriteLine ( " Is ▁ it ▁ a ▁ k ▁ sorted ▁ array ▁ ? : ▁ " + isKSortedArray ( arr , arr . Length , k ) ) ; } }