题目
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [?2,1,?3,4,?1,2,1,?5,4],
the contiguous subarray [4,...
分类:
其他好文 时间:
2014-06-19 12:08:20
阅读次数:
270
package com.example.android_provider3;
import android.app.Activity;
import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollListener;
public class OnScrollListenerDemo extends A...
分类:
其他好文 时间:
2014-06-16 12:02:06
阅读次数:
162
Example syntax for Secure Copy (scp)What is Secure Copy?scpallows files to be copied to, from, or between different hosts. It usessshfor data transfer...
分类:
其他好文 时间:
2014-06-15 22:30:51
阅读次数:
290
& produces the address of its operand. For example,the following statements an integer variable 'a' and apointer to an integer variable 'p' are dec...
分类:
其他好文 时间:
2014-06-15 20:41:58
阅读次数:
155
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
sum = 22,
5
...
分类:
其他好文 时间:
2014-06-15 19:55:39
阅读次数:
191
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ 2 2
/ \ / 3 4 4 3
But the f...
分类:
其他好文 时间:
2014-06-15 19:49:35
阅读次数:
176
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum
...
分类:
其他好文 时间:
2014-06-15 19:26:23
阅读次数:
207
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [3,2,1].
Note: Recursive solut...
分类:
其他好文 时间:
2014-06-15 19:06:52
阅读次数:
166
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that
adding up all the values along the path equals the given sum.
For example:
Given the below bin...
分类:
其他好文 时间:
2014-06-15 09:34:35
阅读次数:
226
1、
??
Unique Binary Search Trees II
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 uni...
分类:
其他好文 时间:
2014-06-15 09:09:00
阅读次数:
256