Anonymous interview question

Reverse String and sorting array without using function