diff --git a/Solutions/S28.cpp b/Solutions/S28.cpp new file mode 100644 index 0000000..685a15a --- /dev/null +++ b/Solutions/S28.cpp @@ -0,0 +1,8 @@ +vector countBits(int num) { + vector res; + for(int i = 0; i <= num; i++) + { + res.push_back(__builtin_popcount(i)); + } + return res; +} \ No newline at end of file