100% faster Java | No HashMap/HashSet/Array | O(1) Solution
Simply check from Z till A if that character nd it\'s corresponding lowerCase character exists.\nTime Complexity: O(26)\nSpace Complexity: O(1)\n\nDo upVote if 
Simply check from ```Z``` till ```A``` if that character nd it\'s corresponding lowerCase character exists.\nTime Complexity: O(26)\nSpace Complexity: O(1)\n\nDo ***upVote*** if you found it helpful\uD83D\uDC4D\uD83C\uDFFB\n\n```\npublic String greatestLetter(String s) {\n      for(char ch=\'Z\';ch>=\'A\';ch--){\n         if(s.indexOf(ch) != -1 && s.indexOf(Character.toLowerCase(ch)) != -1)\n             return String.valueOf(ch); \n      }\n        return "";\n    }\n```
['Java']