Return the length of the last word in a string
Company: IBM
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: easy
Interview Round: Other
Overview: Given a string of English letters and spaces, return the length of its last word, where spaces can appear before, between and after the words. The problem tests careful string scanning, handling of leading and trailing spaces, and a constant-space solution.