Monday, February 3, 2025
Length of Last Word

Updated: February 2025
Length of Last Word
easy
💡 Intuition
- The idea is to iterate through each character while using a flag to track whether a word has started and continue counting until a space (" ") is encountered.
🚀 Solution
go
⏳ Time Complexity
- Since we are taking single loop for the array of length n, the time complexity will be
O(n)