Prime visit hackerblock problem doubt
hello @thakur0_0
base case of prime visit function should be-> if a>b return 0.
also ur solution is not efficient , it will give tle.
for optimisation, precompute count till each index i and store it in some array and then use this array to answer each query in O(1).
video editorial by prateek bhaiya.
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.