My LeetCode grinding. Trying to do a problem a day.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

problem.txt 225B

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