1
2
3
4
5
6
Use the "Verify Solution" button to get AI feedback on your C++ code.
You are tasked with implementing a function reverseString that takes a C-style string (a null-terminated character array) as input and reverses it in-place. The function signature will be void reverseString(char* s). Your implementation should modify the input string directly, without allocating new memory for a separate reversed string. Consider edge cases such as: - An empty string. - A string with a single character. - Strings with even or odd lengths.