Length of Last Word at Qualcomm

Easy58.3% acceptance

This problem has 50.0% frequency at Qualcomm.

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 hints

Topics

Also asked at 7 companies


More Qualcomm Questions

View all Qualcomm questions