Publicis Sapient interview question

some simple algorithmic questions , reverse a string types