Easy Solution
\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n        string cp="";\n        string cpp="";\n        string str;\n        for(int i=0;i<s.
```\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n        string cp="";\n        string cpp="";\n        string str;\n        for(int i=0;i<s.size();i++){\n            if(s[i]>=\'a\' && s[i]<=\'z\')\n                cp+=s[i];\n                else\n                cpp+=s[i];\n        }\n        transform(cp.begin(), cp.end(), cp.begin(), ::toupper);\n        sort(cp.begin(),cp.end());\n        sort(cpp.begin(),cpp.end());\n        reverse(cp.begin(),cp.end());\n        reverse(cpp.begin(),cpp.end());\n        // return cp;\n        // return cpp;\n        for(int i=0;i<cpp.size();i++)\n        {\n            for(int j=0;j<cp.size();j++)\n            {\n                if(cpp[i]==cp[j]){\n                    str = cpp[i];\n                    return str;\n                    break;\n                }\n            }  \n         }\n        return "";        \n    }\n};\n```
['C']