RedMane Technology interview question

Write a method to reverse a string