杨辉三角,分别求前n行和第n行。
【求杨辉三角前n行】
Given numRows, generate the first numRows of Pascal's triangle.
For example, given numRows = 5,
Return
[
[1],
[1,1],
[1,2,1],
[1,3,3,1],
[1,4,6,4,...
分类:
其他好文 时间:
2014-10-20 19:32:35
阅读次数:
190
problem:Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is...
分类:
其他好文 时间:
2014-10-20 00:37:44
阅读次数:
256
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-10-18 05:23:21
阅读次数:
275
VS2008在release下设置断点调试 设置VS2008的方法步骤。1、 将程序编译模式配置选择为Release。2、 开启Release模式下生成调试信息。项目属性——>Linker——>Debugging——>Generate Debug Info选择为YES3、 选择调试信息...
分类:
其他好文 时间:
2014-10-17 21:49:17
阅读次数:
981
Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni...
分类:
其他好文 时间:
2014-10-17 15:23:35
阅读次数:
148
[leetcode]Given n, generate all structurally unique BST's (binary search trees) that store values 1...n....
分类:
其他好文 时间:
2014-10-17 12:08:07
阅读次数:
165
【题目】
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()", "()(())", "()...
分类:
其他好文 时间:
2014-10-16 17:12:42
阅读次数:
186
Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))...
分类:
其他好文 时间:
2014-10-16 01:27:21
阅读次数:
272
[leetcode]Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order....
分类:
其他好文 时间:
2014-10-15 12:36:40
阅读次数:
188
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should return the following...
分类:
其他好文 时间:
2014-10-13 09:58:09
阅读次数:
170