Scivantage Interview Question

how to reverse the string