Nile Technologies interview question

reverse a string with spaces