Java solution
\nclass Solution {\n    public String greatestLetter(String s) {\n        int [] lower = new int [26];\n        int [] upper = new int[26];\n        for(int i =
```\nclass Solution {\n    public String greatestLetter(String s) {\n        int [] lower = new int [26];\n        int [] upper = new int[26];\n        for(int i = 0 ; i < s.length() ; i++){\n            int ascii = (int)(s.charAt(i));\n            if(ascii <= 90 && ascii >= 65){\n                upper[ascii - 65]++;\n            }\n          if(ascii <= 122 && ascii >= 97){\n                lower[ascii - 97]++;\n            }\n        }\n        int ans = -1;\n        for(int i = 0 ; i < 26 ; i++){\n            if(lower[i] != 0 && upper[i]!= 0){\n                ans = i;\n            }\n        }\n        \n        if(ans != -1){\n        return  String.valueOf((char)(ans+\'A\'));\n        }\n        return "";\n    }\n}\n```
[]