Tap here to switch tabs
Problem
Submissions

Problem: Greatest English Letter in Upper and Lower Case

Greatest English Letter in Upper and Lower Case asks you to find the greatest alphabet letter that appears in a string in both uppercase and lowercase, returning it in uppercase or an empty string.

Statement

Given a string s of English letters, return the greatest English letter that appears as both a lowercase and an uppercase letter in s. The returned letter must be in uppercase. If no such letter exists, return an empty string "".

Letter BB is considered greater than letter AA if BB appears after AA in the English alphabet.

Constraints:

  • 1≤1 \leq s.length ≤1000\leq 1000

  • s consists of lowercase and uppercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Greatest English Letter in Upper and Lower Case

Greatest English Letter in Upper and Lower Case asks you to find the greatest alphabet letter that appears in a string in both uppercase and lowercase, returning it in uppercase or an empty string.

Statement

Given a string s of English letters, return the greatest English letter that appears as both a lowercase and an uppercase letter in s. The returned letter must be in uppercase. If no such letter exists, return an empty string "".

Letter BB is considered greater than letter AA if BB appears after AA in the English alphabet.

Constraints:

  • 1≤1 \leq s.length ≤1000\leq 1000

  • s consists of lowercase and uppercase English letters.