Skip to content

Commit 7b820b8

Browse files
committed
Time: 26 ms (96.07%) | Memory: 16.5 MB (89.20%) - LeetSync
1 parent bd9ba9e commit 7b820b8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Solution:
2+
def lengthOfLastWord(self, s: str) -> int:
3+
return len(s.strip().split()[-1])

0 commit comments

Comments
 (0)