Pergunta de entrevista da empresa LTM Limited

Reverse the String and find whether the array is sorted or not.