reverse String

PHOTO EMBED

Thu Sep 02 2021 06:44:36 GMT+0000 (UTC)

Saved by @Sakshamkashyap7 #c++

// TWO POINTER APPROCH
void reverseString(vector<char>& s) {
  int start=0,end=s.size()-1;
  while(start<end)
    swap(s[start++],s[end--]);
}
content_copyCOPY