Reverse Words in a String
Try to solve the Reverse Words in a String problem.
We'll cover the following
Statement
Given a
Constraints:
The sentence contains English uppercase and lowercase letters, digits, and spaces.
sentence.length
The order of the letters within a word is not to be reversed.
Note: The input string may contain leading or trailing spaces or multiple spaces between words. The returned string, however, should only have a single space separating each word. Do not include any extra spaces.