This code is givnig run time error on my system and not getting accepted

please help me. i have spent a lot of time on this.

@sirraghavgupta
Do not use the hash_array function given in the problem. Refer to it. Understand it. But it is not at all optimised. Write your own function which does the same work as it in a more optimised way.
Refer to this hint video for a better understanding.

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.