Reverse a String
Medium
strings
Description
Given an input string, return the string with its characters in reverse order.
Examples
Example1:
Input: 'programming'
Output: 'gnimmargorp'
Explanation: The characters are arranged in the opposite order.
Example2:
Input: 'racecar'
Output: 'racecar'
Constraints
- Input is a string.
- Output must be a string.
Loading...
Test Case 1
Input: "programming"
Output: "gnimmargorp"
Test Case 2
Input: "hello"
Output: "olleh"
Test Case 3
Input: "A"
Output: "A"
