Reverse Words in a String

Given a string with words and spaces, return a new string with word order reversed. The output should use single spaces and have no leading or trailing spaces.

Examples
Input: "the sky is blue"
Output: "blue is sky the"
Hints

Reverse Words in a String

Given a string with words and spaces, return a new string with word order reversed. The output should use single spaces and have no leading or trailing spaces.