Reverse a String
Problem Statement
You are given a string s. You need to reverse the string.
Example 1
Example 2
Task
You only need to complete the function reverseWord() that takes s as parameter and returns the reversed string.
Expected Time Complexity : O(|S|).
Expected Auxiliary Space : O(1).
Constraints :
1 <= |S| <= 10000
0 Comments