Driver code
public static void main ( String [ ] args ) { int start [ ] = { 0 , 2 , 4 } ; int end [ ] = { 7 , 14 , 6 } ; int n = start . length ; int d = 3 ; System . out . println ( minDistance ( start , end , n , d ) ) ; } }