X Interview Question

string reversal probelm.