My LeetCode grinding. Trying to do a problem a day.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819
  1. Given an integer, write a function to determine if it is a power of two.
  2. Example 1:
  3. Input: 1
  4. Output: true
  5. Explanation: 20 = 1
  6. Example 2:
  7. Input: 16
  8. Output: true
  9. Explanation: 24 = 16
  10. Example 3:
  11. Input: 218
  12. Output: false