Driver program
public static void Main ( string [ ] args ) { int [ ] arr = new int [ ] { 4 , 6 , 2 , 8 , 7 , 21 , 24 , 49 , 44 } ; int n = arr . Length ; Console . Write ( minOperations ( arr , n ) ) ; } }