title: O(1) reverse string
body: <p>Is this the best way to reverse a string in c++? </p>
  
  <pre><code>void reverseString(string &amp;str) {
  
  int begin = 0;
  int end = str.length() - 1;
  
  while (begin &lt; end)
      swap(str[begin++], str[end--]);
  }
  </code></pre>
  
  <p>Is there a better way using recursion? </p>