ADDO AI Interview Question

Write an algorithm to reverse a string.