Skip to content

Commit

Permalink
adding more folders -- windows #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed-Arafat10 committed Sep 9, 2022
1 parent 9fcd785 commit ba60465
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Bit Manipulation/Easy/231. Power of Two.cpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
static ll p = 1;
static ll p = 1;
class Solution {

public:

bool isPowerOfTwo(ll n) {
if(n == p)
{
p =1;
return 1;
}
if(p > n)
{ p =1;
return 0;
}
p*=2;
if(n == p) return 1;
if(p > n) return 0;
p *= 2;
return isPowerOfTwo(n);
}
};
Expand Down

0 comments on commit ba60465

Please sign in to comment.