class Solution
{
public:
void reverseString(vector<char>& s)
{
int left = 0, right = s.size() - 1;
while (left < right)
swap(s[left++], s[right--]);
}
};
카테고리 없음
class Solution
{
public:
void reverseString(vector<char>& s)
{
int left = 0, right = s.size() - 1;
while (left < right)
swap(s[left++], s[right--]);
}
};