Power of Two
Given an integer n, return true if it is a power of two. Otherwise, return false.
Power of Two

Given an integer n, return true if it is a power of two. Otherwise, return false.

Example 1:
Input: 16
Output: true
Input
arr =16

Check power of 2

n

16

000028000024000020000016000012000080001400000
Variables
VariableValue
n16
DepthFunction Call
Stack empty
0/2