title: How to reverse a string in O(1) complexity (runtime)?
body: <p>I faced an interview today and I was asked to reverse a string in <strong>single operation</strong> . I was feeling like it is impossible in less than <strong>O(n)</strong> . By the way ,  I was given a clue , "<strong>Swapping</strong>" ! So . . . does any answer exist ?</p>
  
  <ul>
  <li>Sample Input : "abcdefghi" (or , any strings )</li>
  <li>Sample Output :"ihgfedcba"</li>
  <li>No built in function can be used . ( ex : <code>strrev()</code> )</li>
  <li>The answer is not tricky like just printing/iterating reversely .  </li>
  </ul>