Easiest Python 5-liner Solution w/ Explanation
Simply sort the string.\n2. Now traverse the array backwards (<--) bcz the highest char would be in the end.\n3. Check if both lower and upper case for the char
1. Simply sort the string.\n2. Now traverse the array backwards (<--) bcz the highest char would be in the end.\n3. Check if both lower and upper case for the character exists in str.\n4. Return the char in uppercase, else return empty string.\n```\nclass Solution:\n    def greatestLetter(self, s: str) -> str:\n        s=sorted(s)\n        for i in reversed(range(len(s))): \n            if s[i].upper() in s and s[i].lower() in s:\n                return s[i].upper()\n        return ""\n```
['String', 'Python']