Simple Go / Golang
Time complexity: O(N)\nMemory complexity: O(1)\n\n\nfunc greatestLetter(s string) string {\n    occurrence := make([]bool, \'z\'+1)\n    diff := \'a\' - \'A\'\n
Time complexity: **O(N)**\nMemory complexity: **O(1)**\n\n```\nfunc greatestLetter(s string) string {\n    occurrence := make([]bool, \'z\'+1)\n    diff := \'a\' - \'A\'\n    \n    for _, letter := range s {\n        occurrence[letter] = true\n    }\n    \n    for i := \'Z\'; i >= \'A\'; i-- {\n        if occurrence[i] && occurrence[i+diff] {\n            return string(i)\n        }\n    }\n    \n    return ""\n}\n```
['Go']