not able to clear all test cases and agetting tle for ine test cases,let me kow where i need to change the code for amking al test cases passsed.?
Not ABLE TO CLEAR ALL TEST CASES
Hey @shubhankar1996.dob1
yes urs is brute force approach
You have to apply Sieve followed by prefix sum array
and then u will be able to answer all queries in O(1) time
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.