Chef and The Right TrianglesThe Chef is given a list ofN triangles. Each triangle is identfied by the coordinates of its three corners in the 2-D cart...
分类:
其他好文 时间:
2014-07-14 00:51:29
阅读次数:
198
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 example, given the following triangle
[
[2],
[3,4],
[...
分类:
其他好文 时间:
2014-07-13 16:01:42
阅读次数:
209
Given an index k, return the kth row of the Pascal's triangle.
For example, given k = 3,
Return [1,3,3,1].
Note:
Could you optimize your algorithm to use only O(k) extra space?
原题链接:https:/...
分类:
其他好文 时间:
2014-07-12 20:43:11
阅读次数:
213
poj1163The Triangle(简单DP)...
分类:
其他好文 时间:
2014-07-12 19:45:10
阅读次数:
168
GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]...
分类:
其他好文 时间:
2014-07-12 00:17:08
阅读次数:
226
这是一个简单的c++爬虫,效率并不是很高... 1 #include 2 int s1[1000000],s2[1000000]; 3 void fun(int a, int b) 4 { 5 int i,ii; 6 bool t1,t2,t3,t4; 7 s1[0] = s...
分类:
编程语言 时间:
2014-07-11 18:05:16
阅读次数:
297
原文地址:http://www.onlamp.com/pub/a/onlamp/2007/08/23/advanced-javascript-ii.html?page=1 在前面的文章中,我们介绍了两类JavaScript小工具及其源代码:浮动文本和弹出菜单。本文中,我们将继续介绍另外几个实用的Ja...
分类:
编程语言 时间:
2014-07-11 09:31:03
阅读次数:
441
/* 先说汉若塔I(经典汉若塔问题),有三塔,A塔从小到大从上至下放有N个盘子,现在要搬到目标C上,
规则小的必需放在大的上面,每次搬一个,求最小步数。这个问题简单,DP:a[n]=a[n-1]+1+a[n-1],先把
上面的n-1个放在B上,把最大的放在目标C上,再把N-1个放回到C上即可。
现在是汉若塔II,改为四个塔,开始方程想简单了,不是最优的。
网上的一种最优解法如下:
(1)...
分类:
其他好文 时间:
2014-07-11 08:02:16
阅读次数:
365
微软近期Open的职位:Job Title:Software Development EngineerIIDivision: Server & Tools Business - Commerce Platform GroupWork Location: Shanghai, ChinaAre you ...
分类:
其他好文 时间:
2014-07-10 15:08:15
阅读次数:
380
全球范围来看,移动及互联网流量的增长速度是空前的,导致此现象的缘由包括云服务的增长、移动宽带和基于互联网的视频点播服务的增长。Cisco预计,从2012至2017年,全球互联网IP流量将增至三倍,达到每月120艾字节,而移动数据流量将增长13倍,达到每月逾11艾字节[i]。贝尔实验室则预计,在同一时间区段,城域及骨干网的流量分别将增长560%和360%[ii]。如此高速的带宽增长为作为当前IP网络基石的光传送网带来了难以想像的压力。...
分类:
其他好文 时间:
2014-07-09 12:19:52
阅读次数:
253