one test case not passing
Highest frequency
Your code is not working fine, for the following test cases :
5
1
2
2
3
3
Expected output : 2
Your output : 3
Pls work on the logic for this test case…
it is giving 2 as ouput, still one testcase wrong
I have edited your code now, it is working correctly, I have used the unordered hash table concept in the code… If you didnt understood anything, you can ask
i have understood your code it is the same logic that you ahve used,then what is the error in my code?
It is not working fine for following test case,
4
1
2
1
2
Expected output : 1
Your output : 2