C++ Simple || 2 bits at a time
Approach\n Describe your approach to solving the problem. \n-Add first odd bit to odd bit count\n-Add first even bit to even bit count\n-Shift bits by 2 to the 
# Approach\n<!-- Describe your approach to solving the problem. -->\n-Add first odd bit to odd bit count\n-Add first even bit to even bit count\n-Shift bits by 2 to the right\n-Repeats until there are no bits left\n-Divides even bit count by 2 to get correct value\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> evenOddBit(int n) {\n        vector<int> res{0,0};\n        while(n){\n            res[0]+=n&0b01;//add 1 odd bits\n            res[1]+=n&0b10;//add 2 to even bits\n            n>>=2;\n        }\n        res[1]>>=1;//divide even bits by 2\n        return res; \n    }\n};\n```\n
['Bit Manipulation', 'C++']