Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2014-07-10 11:24:15
阅读次数:
229
IntersectRect 两矩形相交形成的新矩形The IntersectRect function calculates the intersection of two source rectangles and places the coordinates of the intersecti....
分类:
其他好文 时间:
2014-07-10 10:33:52
阅读次数:
272
题目:
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 to the ta...
分类:
其他好文 时间:
2014-06-28 08:17:11
阅读次数:
305
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-28 07:31:28
阅读次数:
214
在比较操作(==,!=,>,=,<=),matches,算数操作(+,-,*,/ ,包含%,?,CASE)中,如果有一个操作数为空,那么结果为空。
COUNT_STAR ,不过滤null数据
CAST 操作:将一个null数据从一个数据类型转换到另一个数据类型,结果为空
AVG,MIN,MAX,SUM,COUNT :这几个操作将忽略空值
CONCAT :任意...
分类:
其他好文 时间:
2014-06-27 23:24:12
阅读次数:
304
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
分类:
其他好文 时间:
2014-06-27 23:02:33
阅读次数:
258
感谢微信平台---一天一道算法题--每天多一点进步----其实今天我接下去补上的几题都来自---待字闺中 所以我就原封不动的将它的题目与分析搬过来了原题给定一个数组,我们可以找到两个不相交的、并且是连续的子数组A和B,A中的数字和为sum(A), B中的元素和为sum(B)。找到这样的A和B,满足s...
分类:
其他好文 时间:
2014-06-27 22:31:04
阅读次数:
342
还不算是难题(嘿嘿,因为我做出来了)
很简单,找到相应的方程式解就是了(中间也犯了一个很2的错误,把9+10+11+...+99写成(1+90)*90/2,改过来后就好了)
不多说,code is below
#include
#include
#include
using namespace std;
int combi(int a,int b)
{
int sum=1;
int...
分类:
其他好文 时间:
2014-06-27 10:45:32
阅读次数:
193
这是一个简单的JSP页面
<%
int i,sum=0;
for( i=1;i
1到100的连续和是:
将该文件保存为example1.jsp 保存到Tomcat 中RooT目录中,然后运行在浏览器中输入 http://localhos...
分类:
Web程序 时间:
2014-06-27 10:04:22
阅读次数:
192
有工具在手,这题就是一个模板题,就是有点不清楚,最后问的是单个元素的值,它怎么sum求出来的
#include
#include
#include
#include
using namespace std;
#define maxn 1005
int c[maxn][maxn];
int Row, Col;
inline int Lowbit(const int &x)
{
...
分类:
其他好文 时间:
2014-06-27 07:38:00
阅读次数:
281