I submit a solution six month ago for 3sum problem with a time complexity of O(n^2log(n)), and got an AC. But i got TLE when i resubmit the same code just today.
Any changes to the OJ judging rules during this period?!
thanks!
TLE means your solution took too long. As the judge can't be expected to easily calculate time complexities for all the algorithms, it instead compares your solution against a set of times in milliseconds for how long it takes to finish. The time it compares against is set by the owners of the site as a time which the optimal solution should never exceed, but less efficient algorithms will.
Since your algorithm passed before, and not now, you likely have a non-optimal solution, which was lucky enough to come in under the time limit the first time.
PS: Thanks to loick and gautamnitc, we know the optimal solution in O(n^2), not O(n^2 logn).