QuestionGiven a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant dig...
分类:
其他好文 时间:
2015-09-11 06:45:53
阅读次数:
193
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-10 21:13:39
阅读次数:
162
题目描写叙述:Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321思路:先推断给的数是正数还是负数还是零。假设是零,则直接返回。假设是正数,则通过%和/运算求得给定数字的各位,再...
分类:
其他好文 时间:
2015-09-09 17:20:03
阅读次数:
123
题目描写叙述:Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321思路:先推断给的数是正数还是负数还是零。假设是零,则直接返回。假设是正数,则通过%和/运算求得给定数字的各位,再...
分类:
其他好文 时间:
2015-09-09 16:31:07
阅读次数:
108
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here are some good questions to ask...
分类:
其他好文 时间:
2015-09-08 08:24:05
阅读次数:
129
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-08 06:58:45
阅读次数:
172
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are som...
分类:
其他好文 时间:
2015-09-07 22:50:48
阅读次数:
158
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-07 21:14:43
阅读次数:
226
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which...
分类:
其他好文 时间:
2015-09-06 21:21:23
阅读次数:
131
来源:LeetCode 258 Add Dights Question:Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For exa...
分类:
其他好文 时间:
2015-09-03 21:41:44
阅读次数:
157