I submitted a solution and it executed in 1.5 seconds and was accepted even though the time limit was 1s, Why is that?
1 Like
i think you have done that in JAVA.For JAVA time limit is double that of the standard time limit
2 Likes
For slow languages like JAVA time contrained is 2x the given time, so for you time constraint is 2 sec for that question.
2 Likes
Your solution might be written in Python/Java etc. These languages have specific relaxed time limits based on the language itself. Read more about it here
3 Likes
I think a similar question was asked today itself. The time limit of 1s is for languages like C++. Languages which are slower than it are given appropriate time compensation.
3 Likes