Skip to content

Latest commit

 

History

History

reverse_a_string

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

String Reverse

Given a string, reverse the characters with out ever creating a new data structure

Function Signature

string_reverse(input:String) -> String

Examples

string_reverse("hello") -> "olleh"
string_reverse("racecar") -> "racecar"

Constraints

  • Modify the string in place. Do not create an additional data structure.
  • Methods like split and reverse return new instances, thus violating our constraints.