does time here matter? like for solving question
Does time here matter? like for solving question
There are 2 things
Time complexity
&
Time Limit
Time complexity is of code , that’s what u are writing ,u will learn about it in the course.
Say if we have one for loop
for(int i=0;i<n;i++) then its complexity is O(n) i.e it need n operations
Every code has its own time complexity
Say if u are running a loop for n then its taken as n operations assuming u are not doing simple arithmetic inside
We decide this on the basis of constraints mentioned in question and then write our code generally but since u are just starting dont worry about this
You will learn about Time complexity of code,if u haven’t till now
Time Limit is of question ,accoding to which u decide what should be complexity of ur code .
Here this is a snapshot of some codechef problem , see time limit is mentioned as 1second.
Every question has its own time limit
So See Its mentioned with the question what should be the max time limit
Most of the times it will be 1second
In 1second u can do 10^8 operations
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
