JAVA - HashSet
\nclass Solution{\n    public String greatestLetter(String s){\n        Set<Character> set = new HashSet<>();\n        for(char ch : s.toCharArray())       set.
```\nclass Solution{\n    public String greatestLetter(String s){\n        Set<Character> set = new HashSet<>();\n        for(char ch : s.toCharArray())       set.add(ch);\n        for(char ch = \'Z\'; ch >= \'A\'; ch--)\n            if(set.contains(ch) && set.contains((char)(\'a\'+(ch-\'A\'))))\n               return ""+ch;\n        return "";\n    }\n}\n```\nKindly upvote if you find helpful
['Ordered Set', 'Java']