Suppose I have a program which after submission shows time limit exceeded. Does this mean that it has been able to clear all the test cases but could not do so within the required timeORthat before it could complete all the test cases the time limit got exceeded?
If it's the second case then that means that my code could give wrong answer even after I optimize it because my logic is incorrect and if it's the first case then that means that my current logic is correct but it could be optimized.
Was just curious.