My LeetCode grinding. Trying to do a problem a day.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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