Driver code
public static void Main ( ) { int [ ] arr = { 2 , 1 , 5 , 6 , 3 } ; int n = arr . Length ; int k = 3 ; Console . WriteLine ( minSwap ( arr , n , k ) ) ; int [ ] arr1 = { 2 , 7 , 9 , 5 , 8 , 7 , 4 } ; n = arr1 . Length ; k = 5 ; Console . WriteLine ( minSwap ( arr1 , n , k ) ) ; } }