Skip to content

Commit 1ac96cc

Browse files
authored
Create GatesMa.md
1 parent 40a843f commit 1ac96cc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

2018.12.3-leetcode58/GatesMa.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# c++
2+
```cpp
3+
class Solution {
4+
public:
5+
int lengthOfLastWord(string s) {
6+
stringstream ss;
7+
ss << s;
8+
string str;
9+
while(ss){
10+
ss >> str;
11+
}
12+
return str.length();
13+
}
14+
};
15+
```

0 commit comments

Comments
 (0)