Skip to content

Commit d465b74

Browse files
committed
Time: 41 ms (34.58%), Space: 23.2 MB (76.28%) - LeetHub
1 parent 6db58f5 commit d465b74

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Solution {
2+
public:
3+
void reverseString(vector<char>& ch) {
4+
int s = 0;
5+
int e = ch.size() - 1;
6+
while(s<=e)
7+
swap(ch[s++],ch[e--]);
8+
9+
}
10+
};

0 commit comments

Comments
 (0)