solution of leetcode problem 89 class Solution { public: vector grayCode(int n) { vector ans; for(int i=0;i<pow(2,n);i++){ ans.push_back((i>>1)^i); } return ans; } };
letseewithpositive / leetcode_problem_3 Goto Github PK
View Code? Open in Web Editor NEWsolution of leetcode problem 89