Write a function that reverses the order of the words in a string?
<p>Im reading the book "programming interviews exposed" and the following question was interesting to me:</p>

<blockquote>
  <p>Write a function that reverses the order of the words in a string. For
  example, your function should transform the string “Do or do not,
  there is no try.” to “try. no is there not, do or Do”. Assume that all
  words are space delimited and treat punctuation the same as letters.</p>
</blockquote>

<p>this image was included to help with the design of the algorithm: </p>

<p><img src="http://i.stack.imgur.com/7wBfr.png" alt="enter image description here"></p>

<p>what is the most efficient way of implementing this in JAVA?</p>
