πŸ’‘ Highest frequency( Hashing )


why is this code failing last 2 test cases

HI @aganunay, in line no. 15 to 23 of your code just replace it by:

m[a[i]]++;

Your code will work perfect then.

Hope this helps :slight_smile:

@proRram sir I implemented the changes suggested by you


Stil last two cases are failing pls help

@aganunay pls try changing the variable types to long long int istead of int at required places. To know the required places pls check the constraints in question statement. See which variable can take what maximum value and what can be the maximum size of array.

Hope this helpsπŸ˜ƒ

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.