Pregunta de entrevista de Global Relay

Reverse String. How can you optimise it.