码迷,mamicode.com
首页 >  
搜索关键字:oj    ( 4253个结果
[LeetCode]118 Pascal's Triangle
https://oj.leetcode.com/problems/pascals-triangle/http://blog.csdn.net/linhuanmars/article/details/23311527publicclassSolution{ publicList<List<Integer>>generate(intnumRows){ List<List<Integer>>toReturn=newArrayList<>(); if(nu..
分类:其他好文   时间:2015-01-06 18:15:51    阅读次数:126
[LeetCode]119 Pascal's Triangle II
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
[LeetCode]116 Populating Next Right Pointers in Each Node
https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node/http://blog.csdn.net/linhuanmars/article/details/23499383/** *Definitionforbinarytreewithnextpointer. *publicclassTreeLinkNode{ *intval; *TreeLinkNodeleft,right,next; *TreeLinkNode..
分类:其他好文   时间:2015-01-06 18:15:27    阅读次数:170
[LeetCode]117 Populating Next Right Pointers in Each Node II
https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/http://blog.csdn.net/linhuanmars/article/details/23510601/** *Definitionforbinarytreewithnextpointer. *publicclassTreeLinkNode{ *intval; *TreeLinkNodeleft,right,next; *TreeLinkN..
分类:其他好文   时间:2015-01-06 18:14:12    阅读次数:118
[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]120 Triangle
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
[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
mysql安装使用
在OJ中,mysql主要用来存储用户信息。它的安装和使用比较简单,下面简单介绍一下。首先说明一下我的Linux分支环境是Ubuntu 12.04,其他的分支大致步骤也是类似,可能命令有所不同。  一、安装...
分类:数据库   时间:2015-01-06 18:01:41    阅读次数:209
修改字符串
#include #include #include #include "oj.h" int ChangeStringOnce(char *pInStr, char *pOutStr) { if (NULL == pInStr || NULL == pOutStr) { return -1; } int iInStrLen =0; ...
分类:其他好文   时间:2015-01-06 17:57:44    阅读次数:158
[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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!