Reverse a string word by word

 problem: reverse "the house is blue", the answer should be "blue is house the". the words are reversed, but the letters are still in order (within the word).solution: solving the initial problem of just reversing a string can either be a huge help or a frustrating hinderance. most likely the first attempt will be to solve it the same way, by swapping letters at the front of the string with letters at the back, and then adding some logic to keep the words in order. this attempt will lead to confusion pretty quickly.for example, if we start by figuring out that "the" is 3 letters long and then try to put the "t" from "the" where the "l" from "blue" is, we encounter a problem. where do we put the "l" from "blue"? hmm... well we could have also figured out how long "blue" was and that would tell us where to put the "l" at... but the "e" from "blue" needs to go into the space after "the". argh. its getting quite confusing. in fact, i would be delighted to even see a solution to this problem using this attack method. i don't think its impossible, but i think it is so complex that it's not worth pursuing.here's a hint. remember before when we just reversed "the house is blue"? what happened?initial: the house is bluereverse: eulb si esuoh ehtlook at the result for a minute. notice anything? if you still don't see it, try this.initial: the house is bluereverse: eulb si esuoh ehtwanted : blue is house thethe solution can be attained by first reversing the string normally, and then just reversing each word