C++
\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n       int k=-1;\n        vector<int> a(26,0);//lowercase\n        vector<int> b(26,0);//upp
```\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n       int k=-1;\n        vector<int> a(26,0);//lowercase\n        vector<int> b(26,0);//uppercase\n        for(int i=0;i<s.size();++i){\n            if(s[i]-\'a\'>=0){\n        a[s[i]-\'a\']=1;\n            }else{\n                b[s[i]-\'A\']=1;\n            }\n        }\n        for(int j=0;j<26;++j){\n\n            if(a[j]==1 && b[j]==1)\n            {\n               k=j; \n            }\n        }\n        string d;\n        d=(char)(65+k);\n        if(k==-1) return "";\n        return  d;\n    }\n};\n```
['C']