https://leetcode.com/problems/reverse-string/
Example 1:
Input: s = ["h","e","l","l","o"]
Output: ["o","l","l","e","h"]
Example 2:
Input: s = ["H","a","n","n","a","h"]
Output: ["h","a","n","n","a","H"]
class Solution:
def reverseString(self, s: List[str]) -> None:
l, r = 0, len(s)-1
while r > l:
s[l], s[r] = s[r], s[l]
r -= 1
l += 1
func reverseString(s []byte) {
i := 0
j := len(s) - 1
for i < j {
left := s[i]
s[i] = s[j]
s[j] = left
i++
j--
}
}