更新时间:2023-02-10 21:28:42
您(最有可能)无法解决您的问题,为O(n ^ 2)
,在至少没有这样的算法是已知的。***的解决方案有子立方的复杂性,但它是非常难以实施,可能在实践中要慢。你可以阅读了一篇关于它这里。
You (most likely) can't solve your problem in O(n^2)
, at least no such algorithm is known. The optimal solution has sub-cubic complexity, but it's very hard to implement and probably slower in practice. You can read a paper about it here.
用通常的算法是为O(n ^ 3)
之一,你发现了这个问题引用。
The usual algorithm used is the O(n^3)
one referenced in the question you found.