Cognizant Interview Question

Reversal of string