What is the time complexity to reverse a string?
O(n^2)
O(1)
O(log n)
O(n)
This question is part of this quiz :