CodeOath
← All problems

Reverse a String

Easy
strings

Reverse a string.

Example:

Input: str = "hello"
Output: "olleh"

Constraints:

  • 0 <= str.length <= 10^4