Length of Last Word
Given a string s consisting of words and spaces, return the length of the last word in the string.
Length of Last Word

Given a string s consisting of words and spaces, return the length of the last word in the string.

Example 1:
Input: "Hello World"
Output: 5
Input
arr ="Hello World"

Find last word

s
H0e1l2l3o45W6o7r8l9d10
Variables
VariableValue
sHello World
DepthFunction Call
Stack empty
0/1