leetcode.89专题

leetCode.89. 格雷编码

leetCode.89. 格雷编码 题目思路 代码 class Solution {public:vector<int> grayCode(int n) {vector<int> res(1,0); // n = 0时,之后一位0while (n--) {// 想要实现对象超下来,就从末尾开始,让vector里面 加 元素for (int i = res.size() - 1;