
Reverse a list of characters in place. Use an algorithm that modifies the input array directly rather than building another full-size array.
["h", "e", "l", "l", "o"]Output["o", "l", "l", "e", "h"]["H", "a", "n", "n", "a", "h"]Output["h", "a", "n", "n", "a", "H"]`1 <= len(chars) <= 10^5``chars[i]` is a single printable characterPrimary solution should use `O(1)` extra space