Driver Code
int main ( ) { int arr [ ] = { 1 , 1 , 2 , 2 , 3 , 4 } ; int cost [ ] = { 3 , 2 , 5 , 4 , 2 , 1 } ; int N = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; minimumCost ( arr , cost , N ) ; return 0 ; }