Highest frequency(hashing)

2 test cases failed.can u help me to rectify it?
This is my link https://ide.codingblocks.com/s/299035

@gokulmaran, your code won’t work in case the elements are negative , as index of an array has to be a non negetive integer

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.