Driver code
public static void main ( String [ ] args ) { int A [ ] = { 1 , 2 , 3 , 2 , 4 } ; int B [ ] = { 2 , 1 , 3 , 1 , 4 } ; int N = A . length ; System . out . println ( calc_distance ( A , B , N ) ) ; } }