Reverse String

Write a C++ function that reverses the input string and returns the reversed version.

Instructions

  1. Ensure that your function is defined within the reverse_string namespace provided in the template and do not update the default function prototype Signature given & ensure that your header file, reverse_string.h is unedited.

.2. Using String Methods: As a hint, consider using built-in string methods in C++ to simplify your task. The rbegin() and rend() methods can be particularly useful for this operation.

Examples

  • For the input: hello, the expected output is: olleh
  • For the input: world, the expected output is: dlrow

Good luck with your implementation!

Adding your container request
Getting your dedicated container
Connecting to your container
Setting up your editor
Finalizing your playground
TerminalEditorBrowser