Interview Question : Reverse all words in a given string

One string is given. Reverse its words. For example, if the string is “Hello world”, the output will be “world Hello”.

Don’t reverse the characters, reverse only the words.