C++ EASY TO UNDERSTAND
\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n        unordered_map<int,int>m,m1;//Here i created this for gathering of elements...\n     
```\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n        unordered_map<int,int>m,m1;//Here i created this for gathering of elements...\n        for(int i=0;i<s.length();i++){\n            if(s[i]<97){\n                m[s[i]-\'A\']++;//Here i am counting Upper case letters with their values\n            }\n            else{\n                m1[s[i]-\'a\']++;//Here Lower Case ltters\n            }\n        }\n        string s1="";int a=0;//Here this variable is Used to compare greater element\n        for(auto x:m){//x.second==1 means it represents a element of Upper case letter\n            if(x.second=1 && m1.find(x.first)!=m1.end() && x.first>=a){//x.first>=a this is for comapring of greater element\n                  s1=\'A\'+x.first;a=x.first;        //m1.find(x.first)!=m1.end() this is checking whether lower case letter is there or not\n            }\n        }\n        return s1;\n    }\n};\nIf you have any query you can ask....\n```
['C']