leetcode 434[easy]---Number of Segments in a String
2017-12-25 18:36
447 查看
Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters.
Please note that the string does not contain any non-printable characters.
Example:
Input: "Hello, my name is John" Output: 5
Seen this question in a real interview before? No
Thanks for your feedback.
思路:用s.split()以空格键分割string,并以list形式输出
相关文章推荐
- LeetCode434 Number of Segments in a String java and python solution
- 20170223-LeetCode_434_Number of Segments in a String
- Leetcode Number of Segments in a String 434
- Leetcode 434 Number of Segments in a String
- leetcode 434- Number of Segments in a String
- Leetcode 434 Number of Segments in a String
- leetcode[Number of Segments in a String]//待整理多种解法
- LEETCODE--Number of Segments in a String
- 【LeetCode】Number of Segments in a String 解题报告
- Leetcode: Number of Segments in a String
- 20170223-leetcode-091-Number of Segments in a String
- 【Leetcode】【python】Number of Segments in a String
- LeetCode Number of Segments in a String
- 434 Number of Segments in a String
- Leetcode Number of Segments in a String
- LeetCode : Number of Segments in a String
- String-434-Number of Segments in a String
- leetcode oj java Number of Segments in a String
- 434_Number_of_Segments_in_a_String
- [LeetCode] Number of Segments in a String 字符串中的分段数量