Appinventiv interview question

String reversal