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?!
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.
thanks for your reply!
I know how OJ works and i understand what you mean.
I'm just very curious about whether the administrator has reset the time limit during this six month period.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.