Anonymous Interview Question

Reverse String and sorting array without using function