摘要:
Counting Bits Counting Bits Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their 阅读全文
摘要:
Find Minimum in Rotated Sorted Array II Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run 阅读全文
摘要:
Find Minimum in Rotated Sorted Array Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 阅读全文
摘要:
Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list a 阅读全文
摘要:
Gray Code The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the 阅读全文
摘要:
Palindrome Number Determine whether an integer is a palindrome. Do this without extra space. https://leetcode.com/problems/palindrome-number/ 判断一个数字是否 阅读全文
摘要:
Climbing Stairs You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct 阅读全文
摘要:
Maximal Square Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given th 阅读全文
摘要:
Perfect Squares Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. For exampl 阅读全文
摘要:
Count Prime Description: Count the number of prime numbers less than a non-negative number, n. https://leetcode.com/problems/count-primes/ 找出所有小于n的数中的 阅读全文