Pregunta de entrevista de Citicapital Commercial Corp

How to reverse a string in most optimised way??