Reverse String
String Manipulation
Beginner
5 points
Write a function that reverses a string.
Success Rate
0%
0 attempts
Problem Statement
Write a function that reverses a string. The input string is given as an array of characters s.
You must do this by modifying the input array in-place with O(1) extra memory.
Examples
Input:
s = ["h","e","l","l","o"]
Output:
["o","l","l","e","h"]
Explanation:
The string "hello" becomes "olleh".
Community Discussion
Quick Actions
Challenge Statistics
Total Attempts
0
Success Rate
0%
Difficulty
Beginner
Points Reward
5
Supported Languages
Python
Javascript
Java
Tags
#string
#two-pointers