码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
Leetcode Sum Root to Leaf Numbers
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:其他好文   时间:2014-06-20 15:30:19    阅读次数:227
[leetcode] 2. 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-17 23:38:04    阅读次数:341
[LeetCode] Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321Have you thought about this?Here are some good questions to ...
分类:其他好文   时间:2014-06-17 20:06:14    阅读次数:205
LeetCode - Restore IP Addresses
Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given "25525511135", return ["255.255.11.135", "255.255.111.35"]. (Order do...
分类:其他好文   时间:2014-06-16 19:24:42    阅读次数:248
【Leetcode】Plus One
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 the head of the list. 思路:原有数组需要多出一位的唯一条件是数组所...
分类:其他好文   时间:2014-06-15 18:42:43    阅读次数:162
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. F...
分类:其他好文   时间:2014-06-15 14:51:02    阅读次数:167
[leetcode]Add Two Numbers @ Python
原题地址:https://oj.leetcode.com/problems/add-two-numbers/题意:You are given two linked lists representing two non-negative numbers. The digits are stored i...
分类:编程语言   时间:2014-06-15 00:40:44    阅读次数:328
POJ 3373 Changing Digits 好蛋疼的DP
一开始写的高位往低位递推,发现这样有些时候保证不了第四条要求。于是又开始写高位往低位的记忆化搜索,又发现传参什么的蛋疼的要死。然后又发现高位开始的记忆化搜索就是从低位往高位的递推呀,遂过之。 dp[i][j]记录在i位 且 余数为j时的最优解情况。 dp[i][j].next表示当前的最优解是由哪一种状态转移过来的。 代码又写锉了。。 #include #include #includ...
分类:其他好文   时间:2014-06-10 18:08:31    阅读次数:222
projecteuler---->problem=24----Lexicographic permutations
问题描述: A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabeti...
分类:其他好文   时间:2014-06-10 06:13:21    阅读次数:299
Plus One
题目 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 the head of the list. 方法 ...
分类:其他好文   时间:2014-06-10 06:12:06    阅读次数:285
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!