Practice Maximum Value of a String in an Array
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
A string containing only decimal digits has the value represented by those digits. Any other alphanumeric string has value equal to its length. Return the greatest value among strs.
Source: Maximum Value of a String in an Array on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
strs = ["alic3","bob","3","4","00000"]
Output
5
# Example 2
Input
strs = ["1","01","001","0001"]
Output
1
Constraints
1 <= strs.length <= 100
1 <= strs[i].length <= 9
strs[i] consists of only lowercase English letters and digits.
Related LeetCode Problems
Practice more problems similar to Maximum Value of a String in an Array.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.