
Reverse the characters of a string and return the reversed result. Aim for a linear-time solution and be clear about how you handle empty and single-character inputs.
s = "hello"Output"olleh"WhyCharacters are reversed from end to start.s = "Goodyear"Output"raeydooG"WhyEach character moves to its mirrored position.`0 <= len(s) <= 10^5``s` may include letters, digits, spaces, and punctuationReturn a new reversed string