leetCode1 min read
58. Length of Last Word | LeetCode Solution | JavaScript | Easy
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.
P
Pranay Kothapalli
July 28, 2024
#leetCode_arrays#leetCode_easy
PK
Pranay Kothapalli
Senior Frontend Developer specializing in UI components and design systems. With over 12 years of experience, I contribute to open-source projects and write about React, TypeScript, and modern web development.
Maintainer at Rad UIFullstack Engineer at Sprinto
Enjoyed this article?
Explore more interactive algorithm visualizations and computer science concepts to continue your learning journey.