Skip to content

Commit 43ff383

Browse files
committed
Time: 0 ms (100%), Space: 48.7 MB (89.87%) - LeetHub
1 parent 8f86e18 commit 43ff383

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @param {string[]} strs
3+
* @return {number}
4+
*/
5+
var maximumValue = function (strs) {
6+
let res = 0;
7+
for (const str of strs) {
8+
let curLen = !isNaN(str) ? Number(str) : str.length;
9+
res = Math.max(res, curLen);
10+
}
11+
return res;
12+
};

0 commit comments

Comments
 (0)