码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
[LeetCode]122 Best Time to Buy and Sell Stock II
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
[LeetCode]121 Best Time to Buy and Sell Stock
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
[LeetCode]105 Construct Binary Tree from Preorder and Inorder Traversal
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
[LeetCode]106 Construct Binary Tree from Inorder and Postorder Traversal
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
[LeetCode]107 Binary Tree Level Order Traversal II
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
[LeetCode]111 Minimum Depth of Binary Tree
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
[LeetCode]110 Balanced Binary Tree
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
[LeetCode]112 Path Sum
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
[LeetCode]100 Same Tree
https://oj.leetcode.com/problems/same-tree/http://blog.csdn.net/linhuanmars/article/details/22839819/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclassSolution{ publicbooleanis..
分类:其他好文   时间:2015-01-06 12:10:11    阅读次数:135
[LeetCode]87 Scramble String
https://oj.leetcode.com/problems/scramble-string/http://blog.csdn.net/linhuanmars/article/details/24506703publicclassSolution{ publicbooleanisScramble(Strings1,Strings2) { if(s1==null||s2==null||s1.length()!=s2.length()) returnfalse; if(s1.isEmpty()&&am..
分类:其他好文   时间:2015-01-06 12:09:05    阅读次数:134
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!