Given an array of characters s, reverse the array in place and return the modified array. Do not create another array for the result; instead, modify s by swapping characters from both ends.
Example 1:
Input: s = ["h", "e", "l", "l", "o"]
Output: ["o", "l", "l", "e", "h"]
Explanation: Swapping mirrored characters reverses the array.
Example 2:
Input: s = ["H", "a", "n", "n", "a", "h"]
Output: ["h", "a", "n", "n", "a", "H"]
Explanation: The first and last characters are swapped, then the process continues inward.
1 <= len(s) <= 10^5s[i] is a single printable characterO(1) extra space