Practice Greatest English Letter in Upper and Lower Case
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Given a string of English letters s, return the greatest English letter which occurs as both a lowercase and uppercase letter in s. The returned letter should be in uppercase. If no such letter exists, return an empty string. An English letter b is greater than another letter a if b appears after a in the English alphabet.
Source: Greatest English Letter in Upper and Lower Case on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
s = "lEeTcOdE"
"E"
# Example 2
s = "arRAzFif"
"R"
# Example 3
s = "AbCdEfGhIjK"
""
Constraints
Related LeetCode Problems
Practice more problems similar to Greatest English Letter in Upper and Lower Case.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.