https://leetcode-cn.com/problems/reverse-string/
Golang
func reverseString(s []byte) {
mid := len(s) / 2
for i := 0; i < mid; i++ {
s[i], s[len(s)-i-1] = s[len(s)-i-1], s[i]
}
}
https://leetcode-cn.com/problems/reverse-string/
Golang
func reverseString(s []byte) {
mid := len(s) / 2
for i := 0; i < mid; i++ {
s[i], s[len(s)-i-1] = s[len(s)-i-1], s[i]
}
}