0434. Number of Segments in a String
Description
**Input:** s = "Hello, my name is John"
**Output:** 5
**Explanation:** The five segments are ["Hello,", "my", "name", "is", "John"]**Input:** s = "Hello"
**Output:** 1**Input:** s = "love live! mu'sic forever"
**Output:** 4**Input:** s = ""
**Output:** 0ac
Last updated