diff options
Diffstat (limited to 'works/solutions/leetcode/cpp/231.cpp')
-rw-r--r-- | works/solutions/leetcode/cpp/231.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/works/solutions/leetcode/cpp/231.cpp b/works/solutions/leetcode/cpp/231.cpp deleted file mode 100644 index 8861e09..0000000 --- a/works/solutions/leetcode/cpp/231.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include <bitset>
-
-class Solution {
-public:
- bool isPowerOfTwo(int n) {
- if (n <= 0) return false;
- std::bitset<sizeof(n) * 8> bits(n);
- return bits.count() == 1;
- }
-};
|