We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d762365 + 6e499df commit bc78adeCopy full SHA for bc78ade
2018.12.3-leetcode58/disappo1nted.md
@@ -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