Driver program to test above function
public static void main ( String [ ] args ) { int arr [ ] = { 1 , 100 , 101 } ; int N = arr . length ; System . out . println ( minCostToMakeElementEqual ( arr , N ) ) ; } }