LeetCode

Number of Segments in a String

Click here for an explanation.