Skip to content

Commit bc78ade

Browse files
authored
Merge pull request gzc426#299 from dogf1ghts/patch-4
Create disappo1nted.md
2 parents d762365 + 6e499df commit bc78ade

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

2018.12.3-leetcode58/disappo1nted.md

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

0 commit comments

Comments
 (0)