LeetCode 1796. Second Largest Digit in a String
Given an alphanumeric string s
, return the second largest numerical digit that appears in s
, or -1
if it does not exist.
An alphanumeric string is a string consisting of lowercase English letters and digits.
Example 1:
Example 2:
Constraints:
1 <= s.length <= 500
s
consists of only lowercase English letters and/or digits.
Solution
PreviousLeetCode 1794. Count Pairs of Equal Substrings With Minimum DifferenceNextLeetCode 1797. Design Authentication Manager
Last updated