Tap here to switch tabs
Problem
Submissions

Problem: Second Largest Digit in a String

med
30 min
Try to solve the Second Largest Digit in a String problem.

Statement

Given an alphanumeric string s, return the second largest numerical digit found in s, or −1-1 if it does not exist.

Constraints:

  • 1≤1 \le s.length ≤500\le 500

  • s consists of only lowercase English letters and digits.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Second Largest Digit in a String

med
30 min
Try to solve the Second Largest Digit in a String problem.

Statement

Given an alphanumeric string s, return the second largest numerical digit found in s, or −1-1 if it does not exist.

Constraints:

  • 1≤1 \le s.length ≤500\le 500

  • s consists of only lowercase English letters and digits.