Given a string of words, this function will return the length of the longest word. For example, given the input string "The quick brown fox jumps over the lazy dog", the function will return 6, since "quick" is the longest word in the string.
This solution correctly finds the length of the longest word in a string. It splits the string into a list of words, then loops through the list to find the longest word. This is a good approach.
Evaluated at: 2022-11-18 06:16:07