Search
⌘K

Leetcode 434. Number of Segments in a String

Count the number of contiguous runs of non-space characters in a given string and return that count. Handle empty strings and multiple/leading/trailing spaces (i.e., ignore empty segments).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.