Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use onlyO(...
分类:
其他好文 时间:
2014-11-02 12:11:32
阅读次数:
138
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-11-02 07:04:34
阅读次数:
190
Innosetup功能很强大,可以通过它提供的Wizard接口来定制界面,但我对PASCAL语言不熟悉,也不清楚通过那种接口可改动的范围有多大,最后做出来的效果是否好,所以选择了通过一个DLL来实现我的界面。首先,脚本中增加如下设置,以禁至所有Inno setup自身显示的界面:DisableDir...
分类:
其他好文 时间:
2014-10-31 18:36:01
阅读次数:
348
Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use onlyO(...
分类:
其他好文 时间:
2014-10-31 08:47:11
阅读次数:
158
1, ArrayList 的用法 add,get2,for 循环中,每执行一遍,注意i的值已经加1public class Solution { public ArrayList> generate(int numRows) { ArrayList> result=new Arr...
分类:
其他好文 时间:
2014-10-29 08:03:32
阅读次数:
144
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...
分类:
其他好文 时间:
2014-10-27 17:33:44
阅读次数:
223
先说下我的代码风格(很丑,勿喷) maxn表示最大空间的四倍 tree数组表示求和的线段树 delta表示增减的增量标记 sign表示覆盖的标记 delta,sign实际上都是lazy标志 pushdown表示标记下传 pushup表示标记上传(即求和,区间最值) update表示...
分类:
其他好文 时间:
2014-10-27 17:23:11
阅读次数:
189
数学是很难的科学,但因为它是科学家用数学来解释宇宙的语言,我们无可避免的要学习它。看看下面的这些 GIF 动图,它们提供了视觉的方式来帮助你理解各种数学技巧。 1、椭圆的画法 2、杨辉三角问题(Pascal triangles)解法 3、使用“FOIL”轻松的解决二项式乘法 4、对数解法技巧...
分类:
其他好文 时间:
2014-10-27 16:59:48
阅读次数:
227
首先,__cdecl,c declaration,C风格声明。或者 c default calling(笔者瞎编的)。(那么问题来了,为什么PASCAL风格被称为std?)调用约定的内容包括三点:参数出入栈顺序,弹栈工作由谁做,以及产生函数名的方式(renaming?)1.在参数入栈顺序上,__cd...
分类:
其他好文 时间:
2014-10-27 12:14:41
阅读次数:
194
问题描述:
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?
思路:
...
分类:
其他好文 时间:
2014-10-26 11:46:08
阅读次数:
251