You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:
其他好文 时间:
2016-11-24 09:24:18
阅读次数:
149
#66. Plus One Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most signific ...
分类:
其他好文 时间:
2016-11-21 18:32:54
阅读次数:
139
Given a non-negative number represented as a singly linked list of digits, plus one to the number. The digits are stored such that the most significan ...
分类:
其他好文 时间:
2016-11-20 07:00:18
阅读次数:
121
Given a list, rotate the list to the right by k places, where k is non-negative. For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3- ...
分类:
其他好文 时间:
2016-11-16 19:43:40
阅读次数:
163
题目: Add Two Numbers 题目描述: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of the ...
分类:
其他好文 时间:
2016-11-15 23:19:42
阅读次数:
269
Leetcode problem-204 Count Primes Count the number of prime numbers less than a non-negative number, n. 题解:这道题如果对每个小于n的数都进行判断是否为素数并计数会超时,因此采用筛法来解这题。建一 ...
分类:
其他好文 时间:
2016-11-14 15:07:32
阅读次数:
102
Description Let us consider the sequence a1, a2,..., an of non-negative integer numbers. Denote as ci,j the number of occurrences of the number i amon ...
分类:
其他好文 时间:
2016-11-13 01:29:52
阅读次数:
128
Problem: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process ...
分类:
其他好文 时间:
2016-11-10 07:39:17
阅读次数:
306
最近做的题记录下。 258. Add Digits Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num ...
分类:
其他好文 时间:
2016-11-06 13:54:12
阅读次数:
283
原题: 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 binary representation a ...
分类:
其他好文 时间:
2016-11-05 11:27:28
阅读次数:
202