89. 格雷编码">89. 格雷编码 89. 格雷编码func grayCode(n int) (ans[]int) { powN := 1 << n for i := 0; i < powN; i++ { ans = append(ans, i ^ i >> 1) } return }