reverse_string

  • 2022-12-14
  • 浏览 (857)

package string

// 反转字符串

func reverseString(s []byte) {
	i, j := 0, len(s)-1
	for i < j {
		s[i], s[j] = s[j], s[i]
		i, j = i+1, j-1
	}
}

brute_force

brute_force_test

isomorphic_strings

0  赞