Driver Code
public static void main ( String args [ ] ) { int arr [ ] = { 2 , 4 , 6 , 7 , 8 , 10 , 17 } ; int cost [ ] = { 3 , 8 , 20 } ; int N = arr . length ; System . out . println ( MinCost ( arr , cost , N ) ) ; } }