✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Consider building a reversed copy of a string s of length n. Because strings are immutable, the running time is:
reverse = ''
for i in range(n):
reverse = s[i] + reverse