in every question there are some test cases given. what does it mean by them? how to use them? why do every question contain test cases?
What does it mean by test cases?
hello @Anku47
test cases are the different types of inputs to your code to test your defined logic and produce the output. A test case is termed “passed” when the output from your code exactly matches the expected output.
online judge use them to verify our logic.
thats the only way ur correctness of the code can be checked.
What is ur doubt in this problem?
i am not getting the constraints that what are they trying to say… how not to violate the constraints…? how to consider constraints while coding…
how to write the code according to constraints…???
u need to do time complexity analysis. let say ur algorithm is taking log(n) to answer each test cases and if there are t such test cases then in total ur code will be taking
t * log(n) time right?
this time should not exceed this number -> time limit * 10^8
to pass all test cases.
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.