Highest Frequency Hashing

Getting wrong answer in one of the test case.
Here is the code.

@Kishan-Mishra-2464674013761441 hey kishan your code is failed to handle this case
5
1
2
3
3
3
your output is 1
but expected output is 3
and this problem is belongs to the hashing you should do as well with hash map.

1 Like

Made the changes, used unordered_map now. And the test case which you sent is also passed now. But now two test cases are getting failed.

@Kishan-Mishra-2464674013761441 hey kishan do this like
if(x.second >= maxcount)

1 Like