Tap here to switch tabs
Problem
Submissions

Problem: Maximum Value of a String in an Array

med
30 min
Try to solve the Maximum Value of a String in an Array problem.

Statement

You are given an array of alphanumeric strings strs.

The value of each string in strs is defined as:

  • Its numeric representation in base 1010, if it contains only digits.

  • Its length, if it contains any lowercase English letters.

Return the maximum value among all strings in strs.

Constraints:

  • 1≤1 \leq strs.length ≤100\leq 100

  • 1≤1 \leq strs[i].length ≤9\leq 9

  • strs[i] consists of only lowercase English letters and digits.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Value of a String in an Array

med
30 min
Try to solve the Maximum Value of a String in an Array problem.

Statement

You are given an array of alphanumeric strings strs.

The value of each string in strs is defined as:

  • Its numeric representation in base 1010, if it contains only digits.

  • Its length, if it contains any lowercase English letters.

Return the maximum value among all strings in strs.

Constraints:

  • 1≤1 \leq strs.length ≤100\leq 100

  • 1≤1 \leq strs[i].length ≤9\leq 9

  • strs[i] consists of only lowercase English letters and digits.