Reverse a String
Write a function that reverses a string in place.
Constraints
The input is an array of characters
Do it in O(1) extra memory
Examples
Input: ['h','e','l','l','o'] Output: ['o','l','l','e','h']
Practise this challenge
All coding challenges
LetsDiscuss
Loading your session…