Driver Code
public static void Main ( ) { int [ ] arr = { 2 , 4 , 6 , 7 , 8 , 10 , 17 } ; int [ ] cost = { 3 , 8 , 20 } ; int N = arr . Length ; Console . WriteLine ( MinCost ( arr , cost , N ) ) ; } }