Question d’entretien chez Mphasis

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