Java Easy Solution | Frequency Table | O(N)
\nclass Solution {\n\t  public static String greatestLetter(String s) {\n\t        int ans1[] = new int[26];\n\t        int ans2[] = new int[26];\n\t        \n\
```\nclass Solution {\n\t  public static String greatestLetter(String s) {\n\t        int ans1[] = new int[26];\n\t        int ans2[] = new int[26];\n\t        \n\t        for(int i = 0; i<s.length(); i++  ){\n\t            char c = s.charAt(i);\n\t            if(c-\'a\' >= 0){\n\t                ans1[c -\'a\']++;\n\t            }\n\t            else{\n\t                ans2[ c -\'A\']++;\n\t            }\n\t        }\n\t        String ans = "";\n\t        for(int i = 25; i>=0; i-- ){\n\t            if(ans1[i] != 0 && ans2[i] != 0){\n\t                ans +=(char)(\'A\'+ i);\n\t                break;\n\t            }\n\t        }\n\t        return ans;\n\t    }\n}\n```
['Java']