I have a list l which holds n number of points. Each element in the list is a point with x-coordinate and y-coordinate. I am trying to find out the quickest way with which I can find the maximum of all possible distances between the elements in the list l.
To be precise Let the list l be
l = [(1,2),(5,3),(6,9)]
If
d((1,2),(5,3)) = 1,
d((5,3),(6,9)) = 2,
d((6,9),(1,2)) = 5
where d is my distance function, my solution is 5 that is maximum of all possible distances between any pair of points in the list.
I appreciate any help.