🔥✅Best Solution in C++✅|| BitMask🔥✅
Complexity\n- Time complexity:\nO(10) = O(1)\n\n- Space complexity:\nO(1)  \n\n# Code\n### Please Upvote if u liked my Solution\uD83E\uDD17\n\nclass Solution {\
# Complexity\n- Time complexity:\nO(10) = O(1)\n\n- Space complexity:\nO(1)  \n\n# Code\n### Please Upvote if u liked my Solution\uD83E\uDD17\n```\nclass Solution {\npublic:\n    vector<int> evenOddBit(int n) {\n        int even=0,odd=0;\n        vector<int> ans(2);\n        for(int i=0;i<10;i++){ //for ease take upto 32\n            if(n & 1<<i){  //if != 0 then\n                if(i & 1)  //if ith index is odd\n                    odd++;\n                else\n                    even++;\n            }\n        }\n        ans[0]=even,ans[1]=odd;\n        return ans;\n    }\n};\n```\n![e2515d84-99cf-4499-80fb-fe458e1bbae2_1678932606.8004954.png](https://assets.leetcode.com/users/images/0224e98d-cfb8-4bf5-95ed-5e03f9ffd92f_1679198627.6153738.png)\n
['Array', 'Bit Manipulation', 'Bitmask', 'C++']