## Find min distance of two list

Given two sorted list, find the min distance of any 2 elements in 2 lists. For example, {1, 10, 20} and {5, 15, 21} min=21-20=1 {1, 10} and {15, 21} min=15-10=5 Solution 1 is to use merge sort. Compare abs(arr1[i]-arr[2] ) and min. Solution 2 is that it doesn’t compare in each merge. It only… Read More »