Length of Last Word Problem
Length of Last Word Problem — ExecCode Easy DSA Practice
Solve the Length of Last Word problem on ExecCode. Free online easy DSA practice in String. Write and run code in Java, C++, Python — no signup required to run.
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. Examples Example 1 Input: s = "Hello World" Output: 5 Explanation: The last word is "World" with…
Practice Length of Last Word free on ExecCode. Browse more ExecCode DSA problems.