My LeetCode grinding. Trying to do a problem a day.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

12345678910
  1. Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word (last word means the last appearing word if we loop from left to right) in the string.
  2. If the last word does not exist, return 0.
  3. Note: A word is defined as a maximal substring consisting of non-space characters only.
  4. Example:
  5. Input: "Hello World"
  6. Output: 5