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 is like: ...
分类:
其他好文 时间:
2016-08-03 13:13:19
阅读次数:
110
Question:
Given a non-negative number represented as an array of digits, plus one to the number.
The digits are stored such that the most significant digit is at the head of the list.
加1得...
分类:
其他好文 时间:
2016-08-03 10:40:03
阅读次数:
139
2. Add Two Numbers 2. Add Two Numbers You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and ...
分类:
其他好文 时间:
2016-08-03 01:28:36
阅读次数:
135
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-08-03 01:24:13
阅读次数:
155
题目描述: Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example:Given n = 2, return 91. (The answer should b ...
分类:
编程语言 时间:
2016-08-03 01:19:54
阅读次数:
278
Question:
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either d...
分类:
其他好文 时间:
2016-08-02 21:09:19
阅读次数:
194
Question:
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->NULL.
旋转链表
Algorith...
分类:
其他好文 时间:
2016-08-02 21:09:12
阅读次数:
184
题目: Description: Count the number of prime numbers less than a non-negative number, n. Credits:Special thanks to @mithmatt for adding this problem and ...
分类:
其他好文 时间:
2016-08-02 11:27:24
阅读次数:
177
Find out the maximum sub-array of non negative numbers from an array.The sub-array should be continuous. That is, a sub-array created by choosing the ...
分类:
其他好文 时间:
2016-08-01 10:41:27
阅读次数:
222
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 and r ...
分类:
其他好文 时间:
2016-08-01 01:49:28
阅读次数:
243