Problems with tag O(n*(logn)^2)