Length of Last Word at Microsoft
Easy58.3% acceptance
This problem has 37.5% frequency at Microsoft.
Problem Description
Given a string `s` consisting of words and spaces, return _the length of the**last** word in the string._ A **word** is a maximal substring consisting of non-space characters only.
Read full problem and hintsTopics
Also asked at 7 companies
More Microsoft Questions
Longest Substring Without Repeating CharactersMediumLongest Palindromic SubstringMediumRoman to IntegerEasyLongest Common PrefixEasyValid ParenthesesEasy
View all Microsoft questions