Please tell me how to approach this prob

help me in approaching the problem

Hey @kodivine0
In this question you are given a hash function which give you a integer corresponding to an array
using its algorithm mentioned in question

but the problem is that algorithm has high time complexity

now you have to code a algorithm with less time complexity
first observe the pattern and then code the algorithm

Try yourself if u are not able to solve it then let me know

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.

please share the code

Hey @kodivine0
Refer to this

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.