C++ | Using 2 Array
\n\tstring greatestLetter(string s) {\n        int a[26] = {}, A[26] = {};\n        for(char &c : s){\n            if(c >= \'a\' && c <= \'z\') ++a[c - \'a\'];\
```\n\tstring greatestLetter(string s) {\n        int a[26] = {}, A[26] = {};\n        for(char &c : s){\n            if(c >= \'a\' && c <= \'z\') ++a[c - \'a\'];\n            else ++A[c - \'A\'];\n        }\n        string res = "";\n        for(int i = 0; i < 26; i++)\n            if(A[i] > 0 && a[i] > 0) res = char(\'A\' + i);\n        return res;\n    }\n```
['C']