Given an array of characters which forms a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
Example input and
Efficient in terms of my time: took under 2 minutes to write in REBOL:
reverse_words: func [s [string!]] [form reverse parse s none]
Try it out: reverse_words "this is a string" "string a is this"