leetcode

Solution to some Leetcode problems written in C++
git clone git://git.dimitrijedobrota.com/leetcode.git
Log | Files | Refs | README | LICENSE

0344.cpp (176B)


0 class Solution {
1 public:
2 void reverseString(vector<char> &s) {
3 int i = 0, j = (int)s.size() - 1;
4 while (i < j)
5 swap(s[i++], s[j--]);
6 }
7 };