Driver code
public static void main ( String [ ] args ) { int arr1 [ ] = { 3 , 1 , 4 } ; int n = arr1 . length ; int arr2 [ ] = { 5 , 1 , 2 } ; int m = arr2 . length ; int k = 2 ; countDist ( arr1 , n , arr2 , m , k ) ; } }