Reverse the words in a sentence in place
Problem Given a sentence you have to reverse it word by word.
Example
That is, given a sentence like this :
I am a good boy
The in place reverse would be:
boy good a am I
Solutions Method1 - Reverse the sentence first and then words again
First reverse the whole string and then individually reverse the words
I am a good boy
<————->
yob doog a ma I
[Read More]