← 返回 bytedance 的题目列表Count Words
类型:online_judge
Write a function counterWords that takes a string sentence and returns the number of words in it.
Example,
Input: "Hello world" Output: 2
Input: "The quick brown fox jumps over the lazy dog" Output: 9
Example
Input
"Hello world"