Length of Last Word: Interactive Visualizer
Start from the end to skip trailing spaces, then count characters until the first space.