Not able to clear all test cases?tle i am getting

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