Fmars Blog
Inner happiness comes from self-sacrifice
My Blog List
[Leetcode Solution]Length of Last Word
Analysis
One pass algorithm
Use two counters denote the length of last word and current word separately. When '0' or '\0' occurs, let last equal to current
Note
Code
No comments:
Post a Comment
Enter you comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Enter you comment