Back to problems

Reverse a String

Algorithm · LinkedIn · Easy

Create a function reverseString(s: char[]) -> char[] that reverses a string represented as a character array. Perform the reversal directly within the provided array rather than allocating a replacement array. Input A character array s, with 1 <= s.length <= 10^5. Output Return the characters in reverse order. Example Example

Checking your access…