Pregunta de entrevista de PwC

Asked me to write code to reverse string