Publicis Sapient interview question

Reverse the string, sort the number in array