HCLTech interview question

reverse a sring