Frage im Vorstellungsgespräch bei Salesforce

write a program to reverse a string and explain the time complexity