Solved LeetCode program · 58 of 1,000
#0058 · Length of Last Word
Original English source
The word is " fly me to the moon ". The final is the last position of word. The position is final. The letters is 0.
Repeat while position is at least 0 and character position of word is 32.
Set position to one less than position.
Repeat while position is at least 0 and character position of word isn't equal to 32.
Add 1 to letters. Set position to one less than position.
Display letters.
Expected stdout
4