Skip to content

Commit c9e483d

Browse files
authored
Merge pull request gzc426#373 from a-yin/master
Create 湛江甲鸟.md
2 parents 9980e77 + 836eb38 commit c9e483d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

2018.12.3-leetcode58/湛江甲鸟.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
```
2+
public int lengthOfLastWord(String s) {
3+
if (s == null || s.length() == 0){
4+
return 0;
5+
}
6+
String[] strs = s.split(" ");
7+
int last = strs.length - 1;
8+
return strs[last].length();
9+
}

0 commit comments

Comments
 (0)