LeetCode Solutions/LeetCoding Challenge/July 2020 LeetCoding Challenge/Gray Code.java
<filename>LeetCode Solutions/LeetCoding Challenge/July 2020 LeetCoding Challenge/Gray Code.java<gh_stars>0class Solution {
public:
    vector<int> grayCode(int n) {
        vector<int> result;
        long long int p = pow(2,n);
        for(int i=0; i<p; i++){
            result.push_back(i^(i/2));
        }
        return result;
    }
};