Compute the single-link distance between two clusters: the smallest Euclidean distance between a point of the first cluster and a point of the second.
Implement solve(A,B).
Returns. Return a non-negative float. A and B are arrays of points with the same number of coordinates.
Example 1
Input:
solve([[0.0, 0.0], [1.0, 0.0]], [[0.0, 1.0], [2.0, 1.0]])
Output:
1.0
Example 2
Input:
solve([[0.0, 0.0]], [[3.0, 4.0]])
Output:
5.0
No results yet
Run your code to check it against the examples, or submit to run every test.