Domanda di colloquio di Microsoft

For a given sentence, write down an effective algorithm to reverse each word in the sentence.