Scivantage interview question

how to reverse the string