Greatest English Letter in Upper and Lower Case || c++ || easy solution
\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n        map<char,pair<bool,bool>>m;\n        for(int i=97;i<=122;i++){\n            pair<boo
```\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n        map<char,pair<bool,bool>>m;\n        for(int i=97;i<=122;i++){\n            pair<bool,bool> p=make_pair(false,false); \n            m[i]=p;\n        }\n        for(int i=0;i<s.length();i++){\n            if(s[i]>=97 && s[i]<=122){\n                m[s[i]].second=true;\n            }\n             if(s[i]>=65 && s[i]<=90){\n                m[s[i]+32].first=true;\n            }\n        }\n        string ans="";\n        for(auto x:m){\n            if(x.second.first && x.second.second){\n                ans.clear();\n                ans.push_back(x.first-32);\n            }\n        }\n        return ans;\n    }\n};\n```
['String', 'C']