https://oj.leetcode.com/problems/pascals-triangle-ii/http://blog.csdn.net/linhuanmars/article/details/23311629publicclassSolution{
publicList<Integer>getRow(introwIndex)
{
//SolutionA:
//returngetRow_OKSpace(rowIndex);
//SolutionB:
returngetRow_Extra..
分类:
其他好文 时间:
2015-01-06 18:15:30
阅读次数:
117
https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/http://blog.csdn.net/linhuanmars/article/details/23164149publicclassSolution{
publicintmaxProfit(int[]prices){
//Ifasmanytransactions
//Gready
intpro=0;
intbuy=0;
booleanhold=false;
int..
分类:
其他好文 时间:
2015-01-06 18:13:23
阅读次数:
132
https://oj.leetcode.com/problems/triangle/http://blog.csdn.net/linhuanmars/article/details/23230657publicclassSolution{
publicintminimumTotal(List<List<Integer>>triangle)
{
//SolutionA:
//returnminimumTotal_MaintainSums(triangle);
//SolutionB:..
分类:
其他好文 时间:
2015-01-06 18:12:52
阅读次数:
152
https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock/http://blog.csdn.net/linhuanmars/article/details/23162793publicclassSolution{
publicintmaxProfit(int[]prices)
{
//SolutionA:
returnmaxProfit_DP(prices);
//SolutionB:
//returnmaxProfit_Binary(..
分类:
其他好文 时间:
2015-01-06 18:11:55
阅读次数:
176
https://oj.leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/http://blog.csdn.net/linhuanmars/article/details/24389549/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){va..
分类:
其他好文 时间:
2015-01-06 15:55:10
阅读次数:
101
https://oj.leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/http://blog.csdn.net/linhuanmars/article/details/24390157/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){v..
分类:
其他好文 时间:
2015-01-06 15:54:59
阅读次数:
138
https://oj.leetcode.com/problems/binary-tree-level-order-traversal-ii/http://blog.csdn.net/linhuanmars/article/details/23414711/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){val=x;}
*}
*/
publiccla..
分类:
其他好文 时间:
2015-01-06 15:49:37
阅读次数:
96
https://oj.leetcode.com/problems/minimum-depth-of-binary-tree/http://blog.csdn.net/linhuanmars/article/details/19660209/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){val=x;}
*}
*/
publicclassSoluti..
分类:
其他好文 时间:
2015-01-06 15:47:12
阅读次数:
118
https://oj.leetcode.com/problems/balanced-binary-tree/http://blog.csdn.net/linhuanmars/article/details/23731355/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){val=x;}
*}
*/
publicclassSolution{
publ..
分类:
其他好文 时间:
2015-01-06 15:46:32
阅读次数:
125
https://oj.leetcode.com/problems/path-sum/http://blog.csdn.net/linhuanmars/article/details/23654413/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){val=x;}
*}
*/
publicclassSolution{
publicbooleanhas..
分类:
其他好文 时间:
2015-01-06 15:45:33
阅读次数:
137