Toast Inc interview question

leecode how to reverse a string