我有 n 个字符串,我想找到最接近的一对。
What's the fastest practical algorithm to find this pair?
最佳答案
论文“The Closest Pair Problem under the Hamming Metric”,Min,Kao,Zhu 似乎是你要找的东西,它适用于寻找一个最接近的对。
对于您的情况,其中 n0.294 < D < n,其中 D 是数据的维度 (1000),n 是数据集的大小,算法将在 O(n< sup>1.843 D0.533).
关于string - 如何找到彼此接近的两个字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46137772/