Algorithm to find next greater permutation of a given string

Wikipedia has a nice article on lexicographical order generation. It also describes an algorithm to generate the next permutation. Quoting: The following algorithm generates the next permutation lexicographically after a given permutation. It changes the given permutation in-place. Find the highest index i such that s[i] < s[i+1]. If no such index exists, the permutation … Read more

What is the fastest algorithm to calculate the minimum distance between two sets of points?

Perhaps you should check out (PDF warning! Also note that, for some reason, the order of the pages is reversed) “Optimal Algorithms for Computing the Minimum Distance Between Two Finite Planar Sets” by Toussaint and Bhattacharya: It is shown in this paper that the minimum distance between two finite planar sets if [sic] n points … Read more