Driver code
int main ( ) { int start [ ] = { 0 , 2 , 4 } ; int end [ ] = { 7 , 14 , 6 } ; int n = sizeof ( start ) / sizeof ( int ) ; int d = 3 ; cout << minDistance ( start , end , n , d ) ; return 0 ; }