Search
⌘K

Leetcode 2496. Maximum Value of a String in an Array

Given an array of alphanumeric strings, compute each string's value as its integer value if it contains only digits (leading zeros allowed) or otherwise as its length, and return the maximum value across the array. Constraints are small (≤100 strings, each length ≤9), so a simple scan checking digits vs letters is sufficient.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.