FDM Group Interview Question

Problem: Reverse a String Imagine you're working with a large codebase, and you've come across a scenario where you need to reverse a string. Implement a function that takes a string as input and returns the string reversed. For example: - Input: "hello" - Output: "olleh" - Input: "LeetCode" - Output: "edoCteeL" Constraints: - The input string will consist of printable ASCII characters. - The length of the string will be between 1 and 1000 characters. Please write a function that efficiently reverses the string and handles edge cases, such as an empty string or a string with only one character.