about | help | code help+videos | done | prefs |
test2023_11_02_P1SLHL_longestString
Write a method that returns the length of the longest string in the 'strs' array. Note that there may be one or more ties for the longest string in 'strs'. That doesn't matter as you are returning the LENGTH of the longest string and, in the case of a tie, they would all be that same maximum length. If the array is empty or all the strings in the array are empty, return 0. Look at the test data for examples. test2023_11_02_P1SLHL_longestString(["DeLand High School", "Bulldogs"]) → 18 test2023_11_02_P1SLHL_longestString([]) → 0 test2023_11_02_P1SLHL_longestString(["testing", "this"]) → 7 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 235
Copyright Nick Parlante 2017 - privacy