Driver program to test above functions
public static void Main ( ) { int [ ] arr = { 15 , 18 , 2 , 3 , 6 , 12 } ; int n = arr . Length ; Console . WriteLine ( countRotations ( arr , 0 , n - 1 ) ) ; } }