I submitted a solution and it executed in 1.5 seconds and was accepted even though the time limit was 1s, Why is that?
i think you have done that in JAVA.For JAVA time limit is double that of the standard time limit
For slow languages like JAVA time contrained is 2x the given time, so for you time constraint is 2 sec for that question.
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
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.