摘要:
Given an integer, write a function to determine if it is a power of two. Example 1: Example 2: Example 3: 相关题 二进制中1的个数 LeetCode191 https://www.cnblogs 阅读全文
摘要:
Write a function that takes an unsigned integer and return the number of '1' bits it has (also known as the Hamming weight). Example 1: Example 2: Exa 阅读全文
摘要:
Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library functio 阅读全文
摘要:
Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a non-negative integer. Since the return type is an in 阅读全文