HCLTech Interview Question

reverse a sring