Visa Inc. interview question

reverse a string in java