Maxfreq-------two cases not passing

hi @guptarahul3100, use unordered_map as it uses o(1) time for access and updation as compared to o(logn) time take by map , also use scanf and printf as these are much faster when compared to cin and cout

In case of any doubt feel free to ask :slight_smile:
Mark your doubt as resolved if you got the answer

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.