If your solution is judged Time Limit Exceeded, it could be one of the following reasons:
- Your code has an underlying infinite loop.
- Your algorithm is too slow and has a high time complexity.
- The data structure you returned is in an invalid state. For example, a linked list that contains a cycle.
On the other hand, Timeout simply means the server queue is busy and could not process your submission for the time being. Please wait for about 10 seconds and submit again.