# POW2 -Editorial

#PROBLEM LINK:
[Practice][1]
[Contest][2]
**Author:** [bharathg][3]
**Tester:** [manjunath1996][4]
**Editorialist:** [bharathg][5]
#DIFFICULTY:
EASY
#PROBLEM:
Check if given number is power of 2 or not.
#EXPLANATION:
Since the value of N is as large as 10^9,store all the powers of 2 less than 10^9 in array and check if the given number is in the array or not.
#ALTERNATIVE SOLUTION:
Count the number of ones in binary representation of number N.If the count is equal to 1,answer is YES else
answer is NO.
#AUTHOR'S AND TESTER'S SOLUTIONS:
Author's solution can be found [here][6].
[1]: https://www.codechef.com/problems/POW2
[2]: https://www.codechef.com/MARA2017/problems/POW2
[3]: https://www.codechef.com/users/bharathg
[4]: https://www.codechef.com/users/manjunath1996
[5]: https://www.codechef.com/users/bharathg
[6]: https://www.codechef.com/viewsolution/15134851