Reverse a String
Easyjavapythonccppjavascript
Given a string, print the same string with its characters in reverse order.
Input Format
A single line containing the string S. It has no leading or trailing spaces.
Output Format
Print the reversed string.
Example 1
Input
hello
Output
olleh
Explanation: The characters are read from the last position to the first.
- 1 <= length of S <= 100000
- S consists of visible ASCII characters and spaces.
Submit an attempt to unlock the solution. (Sign in first.)
Related Problems
- Check PalindromeEasy · java, python, c, cpp, javascriptSolve Problem
- Count Vowels and ConsonantsEasy · java, python, c, cpp, javascriptSolve Problem
- Character FrequencyEasy · java, python, c, cpp, javascriptSolve Problem