class Solution {
public List<Integer> grayCode(int n) {
List<Integer> res = new ArrayList<>();
for( int i = 0 ; i < 1 << n ; i ++ )
res.add( i ^ i>>1);
return res;
}
}
1.格雷码的生成原理g( i ) = i ^ i/2
2. m << n 代表m 向左移动n位 , m >> n 代表m向右移动n位