题目: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 w....
分类:
编程语言 时间:
2014-08-01 06:57:21
阅读次数:
297
Description:A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded m...
分类:
其他好文 时间:
2014-08-01 04:39:01
阅读次数:
167
题目还原
Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up t...
分类:
其他好文 时间:
2014-08-01 02:25:11
阅读次数:
391
Problem H
{sum+=i++} to Reach N
Input: standard input
Output: standard output
Memory Limit: 32 MB
All the positive numbers can be expressed as a sum of one, two or more consecutive positive i...
分类:
其他好文 时间:
2014-07-31 20:58:37
阅读次数:
199
Problem Description:
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they...
分类:
其他好文 时间:
2014-07-31 20:48:17
阅读次数:
215
Problem Description:
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 numbe...
分类:
其他好文 时间:
2014-07-31 20:47:17
阅读次数:
215
Description
Recall the definition of the Fibonacci numbers:
f1 := 1
f2 := 2
fn := fn-1 + fn-2 (n>=3)
Given two numbers a and b, calculate how many Fibonacci numbers are in the range...
分类:
其他好文 时间:
2014-07-31 17:11:07
阅读次数:
325
Description
The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj.
For a given sequence of numbers a1, a2, ..., an, if we move the ...
分类:
其他好文 时间:
2014-07-31 13:31:46
阅读次数:
229
Problem DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbe...
分类:
其他好文 时间:
2014-07-31 12:54:46
阅读次数:
704
1 f [4] => e [3] => d [2] => c [1] => b [0] => a ) 9 */10 11 12 13 $numbers = array(1,2,3,4,5,6,7,8);14 arsort($numbers);15 print_r($numbers);16 /*...
分类:
Web程序 时间:
2014-07-31 12:48:36
阅读次数:
222