题目:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree and ....
分类:
编程语言 时间:
2014-07-31 05:22:15
阅读次数:
287
问题描述:
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
解题思路:
这是一个典型的斐波那契数列,对于...
分类:
其他好文 时间:
2014-07-31 00:02:55
阅读次数:
243
题目描述 Give you a lot of positive integers, just to find out how many prime numbers there are.. In each case, there is an integer N representing the num...
分类:
其他好文 时间:
2014-07-30 23:35:35
阅读次数:
300
function doSubmit() {
$(‘#T_form select‘).each(function(){
$(this).find(‘:selected‘).attr(‘selected‘, true);
});
$("#T_form :text").each(function(){
$(this).attr(‘value‘, $(this).val());
})...
分类:
移动开发 时间:
2014-07-30 21:02:44
阅读次数:
209
Problem Description
Given an N * M matrix with each entry equal to 0 or 1. We can find some rectangles in the matrix whose entries are all 1, and we define the maximum area of such rectangle as thi...
分类:
移动开发 时间:
2014-07-30 20:48:34
阅读次数:
260
a 表的字段有id,uid,name,其中id是自增值,CREATE TRIGGER trigger_insert_productAFTER INSERT ON aFOR EACH ROWBEGINinsert into b (uid,name )select NEW.id as d...
分类:
数据库 时间:
2014-07-30 20:23:24
阅读次数:
210
总时间限制: 2000ms 内存限制: 65536kB描述John is going on a fishing trip. He has h hours available (1 = 0 ), is known. Each 5 minutes of fishing decreases the num...
分类:
其他好文 时间:
2014-07-30 20:10:54
阅读次数:
270
A - Colored Sticks
Time Limit:5000MS Memory Limit:128000KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
You are given a bunch of wooden sticks. Each endpoint of each...
分类:
其他好文 时间:
2014-07-30 17:45:54
阅读次数:
246
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo...
分类:
其他好文 时间:
2014-07-30 12:05:03
阅读次数:
248
Animesh has N empty candy jars, numbered from 1 to N, with infinite capacity. He performs M operations. Each operation is described by 3 integers a, b...
分类:
其他好文 时间:
2014-07-30 11:53:43
阅读次数:
221