Infosys interview question

Write a program to reverse string . Sort the array