Skip to content

Commit

Permalink
Create: 0058-Length-Of-Last-Word.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
laitooo committed Jan 8, 2023
1 parent ff32745 commit 639367e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dart/0058-length-of-last-word.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class Solution {
int lengthOfLastWord(String s) {
final words = s.trim().split(" ");
return words[words.length - 1].length;
}
}

0 comments on commit 639367e

Please sign in to comment.