PING PANG PONG interview question

(1) How to invert a string with spaces in?