Visa Inc. interview question

Reverse string