码迷,mamicode.com
首页 >  
搜索关键字:two sum    ( 31846个结果
Problem Sum Root to Leaf Numbers
Problem Description:Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf ...
分类:其他好文   时间:2014-07-07 16:01:34    阅读次数:223
Problem Binary Tree Maximum Path Sum
Problem Description: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 bina...
分类:其他好文   时间:2014-07-07 15:57:05    阅读次数:252
GROUP BY,WHERE,HAVING之间的差别和使用方法
having子句与where有类似之处但也有差别,都是设定条件的语句。在查询过程中聚合语句(sum,min,max,avg,count)要比having子句优先运行.而where子句在查询过程中运行优先级别优先于聚合语句(sum,min,max,avg,count)。简单说来:where子句:sel...
分类:其他好文   时间:2014-07-07 15:53:46    阅读次数:236
Problem Triangle
Problem Description:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For ex...
分类:其他好文   时间:2014-07-07 15:29:11    阅读次数:280
Leetcode Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:其他好文   时间:2014-07-07 14:58:47    阅读次数:175
[leetcode] Combinations
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
分类:其他好文   时间:2014-07-07 14:48:39    阅读次数:160
poj1990 树状数组
1990题意:每头牛有两个属性v,x,计算sigma(max(v[i],v[j])*abs(x[i]-x[j]))1=x[j] +sigma(v[j]*(x[j]-x[i])) x[i]=x[j]其中dist.sum(maxn)-dist.sum(x[i]) 就是坐标在[x[i],maxn]...
分类:其他好文   时间:2014-07-07 14:26:47    阅读次数:292
leetcode - Merge Two Sorted Lists
题目:Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the ...
分类:其他好文   时间:2014-07-07 14:06:19    阅读次数:221
UVA 11995
I Can Guess the Data Structure!Time limit: 1.000 secondsThere is a bag-like data structure, supporting two operations:1 xThrow an element x into the b...
分类:其他好文   时间:2014-07-07 13:26:22    阅读次数:296
[LeetCode] Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100". 1 class Solution 2 { 3 public: 4 ...
分类:其他好文   时间:2014-07-03 11:23:54    阅读次数:164
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!