Problem

Return the length of the longest word in s (words separated by single spaces).

Examples

  • longestWordLength("hi there") -> 5
  • longestWordLength("a bb ccc") -> 3
Compile and test (Ctrl+Enter)