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: 3...
分类:
其他好文 时间:
2015-08-17 13:28:39
阅读次数:
120
Add Digits
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: 3
+ 8 = 11, 1 + 1 = 2. ...
分类:
其他好文 时间:
2015-08-17 12:11:37
阅读次数:
104
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-08-17 11:37:33
阅读次数:
123
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-08-17 10:00:19
阅读次数:
111
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: 3
+ 8 = 11, 1 + 1 = 2. Since 2 has
on...
分类:
其他好文 时间:
2015-08-17 01:06:54
阅读次数:
210
Add DigitsGiven a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is...
分类:
编程语言 时间:
2015-08-17 00:53:13
阅读次数:
138
Well, no matter whether the number is happy or not, its sum-of-squared-digits sequance has a cycle. Well, do you still remember the algorithm for dete...
分类:
移动开发 时间:
2015-08-17 00:51:01
阅读次数:
207
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-08-17 00:50:26
阅读次数:
106
Clone Graph
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.
OJ's undirected graph serialization:
Nodes are labeled uniquely.
We use # as a sep...
分类:
其他好文 时间:
2015-08-16 19:55:36
阅读次数:
149
Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exa...
分类:
其他好文 时间:
2015-08-16 18:09:04
阅读次数:
127