c++ | solution  O(n) time / O(1) memory
\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n        for(char ch=\'z\';ch>=\'a\';--ch){\n            string ss="";\n            ss+=ch-32
```\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n        for(char ch=\'z\';ch>=\'a\';--ch){\n            string ss="";\n            ss+=ch-32;\n            if(s.find(ch)!=string::npos&&s.find(ch-32)!=string::npos)return ss;\n        }\n        return "";\n    }\n};\n```
[]