simple and easy understand solution
if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n\n# Code\n\nclass Solution {\npublic:\n    string greatestLetter(string s) \n    {\n        set<char>st(s.
# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n\n# Code\n```\nclass Solution {\npublic:\n    string greatestLetter(string s) \n    {\n        set<char>st(s.begin(), s.end());\n        unordered_map<char,int>mp;\n        string ans;\n        for(char c:st)\n        {\n            c = toupper(c);\n            mp[c]++;\n            if(mp[c] > 1) \n            {\n                if(ans.empty()) ans += c;\n                else if(c > ans[0])\n                {\n                    ans.clear();\n                    ans += c;\n                }\n            }\n        }\n        return ans.empty() ? "" : ans;\n    }\n};\n```
['Hash Table', 'String', 'C', 'Python', 'C++', 'Java', 'Python3', 'C#']