c++|| solution
\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n        map<char,int> m;\n        \n        vector<int> v1(26,0),v2(26,0);\n        \n      
```\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n        map<char,int> m;\n        \n        vector<int> v1(26,0),v2(26,0);\n        \n        int n=s.size();\n        \n        for(int i=0;i<n;i++)\n        {\n            if(s[i]>=\'a\' && s[i]<=\'z\')\n            {\n                v1[s[i]-\'a\']++;\n            }\n            if(s[i]>=\'A\' && s[i]<=\'Z\')\n            {\n                v2[s[i]-\'A\']++;\n            }\n        }\n        \n        string res="";\n        int mx=0;\n        \n        \n        for(int i=0;i<26;i++)\n        {\n            if(v1[i] && v2[i])\n            {\n                    res="";\n                    res+=(char)(i+65); \n            }\n        }\n        \n        return res;\n    }\n};\n```
[]