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 di...
分类:
其他好文 时间:
2015-09-14 19:14:51
阅读次数:
132
题目: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...
分类:
其他好文 时间:
2015-09-14 16:44:58
阅读次数:
155
唉,做完这道题目后,有种羞愧无比的感觉,果然还是读书太少。。。 什么意思呢?就像这道题目一样,要求你编程计算出从1加到100的结果。于是你用循环从1累加到100,结果为5050。而大家都知道,从数学上的角度来解答,结果就是(a[1]+a[n])* n / 2。 LeetCode上面的这道【A...
分类:
其他好文 时间:
2015-09-14 13:46:16
阅读次数:
114
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 ...
分类:
其他好文 时间:
2015-09-13 18:43:10
阅读次数:
170
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...
分类:
其他好文 时间:
2015-09-13 13:16:00
阅读次数:
122
Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + ...
分类:
其他好文 时间:
2015-09-13 00:47:31
阅读次数:
171
Problem Description:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nod...
分类:
其他好文 时间:
2015-09-12 18:51:23
阅读次数:
152
题目描述:compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 You may assume that the version strings are non-empty and contain only digits and the . character.Th...
分类:
其他好文 时间:
2015-09-12 12:18:12
阅读次数:
162
Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + ...
分类:
其他好文 时间:
2015-09-11 12:10:30
阅读次数:
111
Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + ...
分类:
其他好文 时间:
2015-09-11 08:00:46
阅读次数:
125