Mphasis Interview Question

They asked me to write a program to reverse a string and explain its time complexity.