Brute force|| Easy||O(N) using decimal to binary conversion.
vector evenOddBit(int n) {\n       \n        vectorbinary;\n \n         int i = 0;\n       while (n > 0) {\n\n        binary.push_back(n % 2);\n        n = n / 
vector<int> evenOddBit(int n) {\n       \n        vector<int>binary;\n \n         int i = 0;\n       while (n > 0) {\n\n        binary.push_back(n % 2);\n        n = n / 2;\n        i++;\n       }\n        \n        int od=0,ev = 0;\n        //reverse(binary.begin(),binary.end());\n        for(int i=0;i<binary.size();i++)cout<<binary[i];\n        for(int i=0;i<binary.size();i++)\n        {\n            if(i%2 == 0 && binary[i] == 1)\n            {\n                ev++;\n            }\n            \n            if(i%2 != 0 && binary[i] == 1)\n            {\n                od++;\n            }\n        }\n        return {ev,od};\n    }
['C']