com论坛,
我正在尝试在下面用 C++ 编译这个算法。请问有什么想法吗?
// Find the distance between the two closest elements in an array of numbers.
// Minimum Distance
// dmin = infinity;
// for i = (i to n - 2) do
// for j = i + 1 to n - 1 do
// temp = A[i] - A[j]
// if temp < dmin;
// dmin = temp;
// return dmin;