mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-05 00:25:22 +08:00
10 lines
127 B
Go
10 lines
127 B
Go
package leetcode
|
|
|
|
func reverseString(s []byte) {
|
|
for i, j := 0, len(s)-1; i < j; {
|
|
s[i], s[j] = s[j], s[i]
|
|
i++
|
|
j--
|
|
}
|
|
}
|