Given a non-negative number represented as an array of digits, plus one to the number.
分类:
其他好文 时间:
2014-07-10 09:59:58
阅读次数:
196
Problem :It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order.Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and ...
分类:
其他好文 时间:
2014-06-28 08:13:17
阅读次数:
249
Reverse digits of an integer.
分类:
其他好文 时间:
2014-06-27 12:41:43
阅读次数:
211
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 ...
分类:
其他好文 时间:
2014-06-27 12:21:24
阅读次数:
215
题目: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 sing...
分类:
其他好文 时间:
2014-06-27 11:38:12
阅读次数:
207
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 represents the number 123.
Find the tota...
分类:
其他好文 时间:
2014-06-27 09:53:29
阅读次数:
208
【题目】
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 represents the number 123.
Find the total sum of all root-to-leaf numbers.
For example,
1
...
分类:
其他好文 时间:
2014-06-25 07:32:27
阅读次数:
209
题目
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 digit. Add the two numbers and return...
分类:
其他好文 时间:
2014-06-24 21:46:24
阅读次数:
249
题目
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
Have you thought about this?
Here are some good questions to ask before coding. Bonus poin...
分类:
其他好文 时间:
2014-06-24 20:16:39
阅读次数:
180
import stringimport randomdef get_rand(n): allw = string.letters+string.digits r = [] for i in range(n): r.append(random.choice(allw)) ...
分类:
其他好文 时间:
2014-06-24 13:51:24
阅读次数:
320