Driver Code
int main ( ) { int arr [ ] = { 2 , 4 , 6 , 7 , 8 , 10 , 17 } ; int cost [ ] = { 3 , 8 , 20 } ; int N = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; cout << MinCost ( arr , cost , N ) ; return 0 ; }