Posted on March 3, 2021March 3, 2021 Description Submission class Solution { public: vector<int> countBits(int num) { vector<int> rets; for(int i = 0; i <= num; ++i) { rets.push_back(__builtin_popcount(i)); } return rets; } }; By Bill0412 LeetCode Medium