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 b301888 + 235b2b8 commit a5a2ea3Copy full SHA for a5a2ea3
2018.12.2-leetcode58/zjukk.md
@@ -0,0 +1,11 @@
1
+```
2
+class Solution {
3
+public:
4
+ int lengthOfLastWord(string s) {
5
+ istringstream is(s);
6
+ string tmp;
7
+ while (is >> tmp);
8
+ return tmp.size();
9
+ }
10
+};
11
0 commit comments