title: Reverse the ordering of words in a string
body: <p>I have this <code>string s1 = "My name is X Y Z"</code> and I want to reverse the order of the words so that <code>s1 = "Z Y X is name My"</code>. </p>
  
  <p>I can do it using an additional array. I thought hard but is it possible to do it inplace (without using additional data structures) and with the time complexity being O(n)?</p>