码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
[leetcode] Plus One
Given a non-negative number represented as an array of digits, plus one to the number.
分类:其他好文   时间:2014-07-10 09:59:58    阅读次数:196
ProjectRuler 算法练习之 位数组成字符串相同的整数
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
[leetcode] Reverse Integer
Reverse digits of an integer.
分类:其他好文   时间:2014-06-27 12:41:43    阅读次数:211
[leetcode] Add Two Numbers
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
LeetCode OJ - Add Two Numbers
题目: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
LeetCode——Sum Root to Leaf Numbers
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
LeetCode: Sum Root to Leaf Numbers [129]
【题目】 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
Add Two Numbers
题目 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 Integer
题目 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
获得N位数字字母随机组合
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!