Standard Chartered Bank interview question

string reversal