Microsoft Interview Question

Develop an algorithm that reverses the words in a string stored in a character array. How low can you make the computational and space complexity?