My program gives a TLE in two of the test cases and I am not sure why is that. Please help.
Here is my code : https://ide.codingblocks.com/s/403596
My program gives a TLE in two of the test cases and I am not sure why is that. Please help.
Here is my code : https://ide.codingblocks.com/s/403596
use unordered map
simply iterate ur map . store element which has highest frequency . if two elements has same frequency then pick that which has smaller data value