Also, it would seem that even in the best case, the algorithm requires O(n2) space.
并且，即使在最好的情况，该算法也需要O(n2)的空间。