Genesys Interview Question

reverse the string