Easy CPP Solution | Easy To Understand | Explained with Comments
\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n        vector<int>ret; // Creating a vector\n        string res; // Storing the result\n   
```\nclass Solution {\npublic:\n    string greatestLetter(string s) {\n        vector<int>ret; // Creating a vector\n        string res; // Storing the result\n        for(int i = 0  ; i < s.size() ; i++){\n            if(s[i]>=97 && s[i]<=122){ // Checking lowercase alphabets\n            auto pt = s.find(s[i]-32); // Manipulating the ASCII values to check if uppercase is present\n                if(pt!= string::npos) // If true\n                    ret.push_back(s[i]-32); // Pushback\n            }\n        }\n        if(ret.empty()) // If the vector is empty\n            return ""; // Return NULL\n        res = *max_element(ret.begin() , ret.end()); // store the maximum ascii value in the string\n        return res; // Return the string\n                \n        }\n\n};\n```\n##### Please upvote if you find this helpful\n##### Please visit my github profile for more such solutions\n[](http://)https://github.com/Reehan9/Leetcode-Solutions
['String']