Write a function that takes a string as input and returns the string reversed.
Example
Given s = “hello”, return “olleh”.
Solution
- Java
1 2 3 4 5 | |
- Python
1 2 3 4 5 6 7 8 | |
Write a function that takes a string as input and returns the string reversed.
Given s = “hello”, return “olleh”.
1 2 3 4 5 | |
1 2 3 4 5 6 7 8 | |