Reverse Words in a Sentence
Given a sentence (an array of characters), reverse the order of its words.
We'll cover the following...
Statement
Given a sentence (an array of characters), reverse the order of its words without affecting the order of letters within a given word. All operations must be done in place.
Example
The “Hello World” string should be reversed as “World Hello”.
Here’s another example of reversing words in a sentence:
Sample input
"Hello world."
Expected output
"world. Hello"
... ...