In CodeChef, test cases are typically used with the while(t- -) loop. Let’s assume that the given constraints are:
1 <= t <= 10^2
1 <= n <= 10^4
If I have written a program with a time complexity of O(n^2), will the test cases affect my program’s time complexity? Specifically, will it be O(t * worst case of my individual test case)? If this is the case, it can heavily impact my program and cause it to exceed the time limit (TLE).
I came across this few weeks ago
If not, is it optimized by the problem setter to ensure that my program doesn’t receive a TLE for each individual test case?
- Yes,it effects
- No, it doesn’t effects
- I am not sure about it
0 voters
Or further explain me in detail please.