码迷,mamicode.com
首页 >  
搜索关键字:oj    ( 4253个结果
[LeetCode]79 Word Search
https://oj.leetcode.com/problems/word-search/http://blog.csdn.net/linhuanmars/article/details/24336987publicclassSolution{ publicbooleanexist(char[][]board,Stringword) { Map<Character,List<P>>map=buildMap(board); booleanr=visit(map,word.toCharAr..
分类:其他好文   时间:2015-01-04 19:33:20    阅读次数:146
[LeetCode]80 Remove Duplicates from Sorted Array II
https://oj.leetcode.com/problems/remove-duplicates-from-sorted-array-ii/http://blog.csdn.net/linhuanmars/article/details/24343525publicclassSolution{ publicintremoveDuplicates(int[]A){ if(A==null) return-1;//invalidinput if(A.length==0||A.length==1) retur..
分类:其他好文   时间:2015-01-04 19:32:41    阅读次数:133
[LeetCode]83 Remove Duplicates from Sorted List
https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list/http://blog.csdn.net/linhuanmars/article/details/24354291/** *Definitionforsingly-linkedlist. *publicclassListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ pub..
分类:其他好文   时间:2015-01-04 19:31:37    阅读次数:201
[LeetCode]81 Search in Rotated Sorted Array II
https://oj.leetcode.com/problems/search-in-rotated-sorted-array-ii/http://blog.csdn.net/linhuanmars/article/details/20588511publicclassSolution{ publicbooleansearch(int[]A,inttarget){ if(A==null||A.length==0) returnfalse; returnfind(A,0,A.length-1,target); ..
分类:其他好文   时间:2015-01-04 19:31:08    阅读次数:133
[LeetCode]82 Remove Duplicates from Sorted List II
https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list-ii/http://blog.csdn.net/linhuanmars/article/details/24389429/** *Definitionforsingly-linkedlist. *publicclassListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ ..
分类:其他好文   时间:2015-01-04 19:30:52    阅读次数:150
向升序单向链表中插入一个节点
#include "OJ.h" /* 功能: 输入一个升序单向链表和一个链表节点,向单向链表中按升序插入这个节点。 输入为空指针的情况视为异常,另外不考虑节点值相等的情况。 输入: ListNode* pListHead 单向链表 ListNode* pInsertNode 新插入节点 输出: ListNode* pListHead 单向链表 返回: 正常...
分类:其他好文   时间:2015-01-04 17:15:13    阅读次数:155
整数分隔
#include #include #define MAX 1000000000 using namespace std; int main() { int N =0 ; while (EOF != scanf("%d", &N)) { if (N 1000000) { cout<<"-1"<<endl; ...
分类:其他好文   时间:2015-01-04 13:35:55    阅读次数:138
[LeetCode]62 Unique Paths
https://oj.leetcode.com/problems/unique-paths/http://blog.csdn.net/linhuanmars/article/details/22126357publicclassSolution{ publicintuniquePaths(intm,intn){ if(m<0||n<0) return-1;//Invalidinput //Start0,0 //Endm,n //Useamatrix[m][n]. //Eachelementi..
分类:其他好文   时间:2015-01-04 11:36:10    阅读次数:101
[LeetCode]63 Unique Paths II
https://oj.leetcode.com/problems/unique-paths-ii/http://blog.csdn.net/linhuanmars/article/details/22135231publicclassSolution{ publicintuniquePathsWithObstacles(int[][]obstacleGrid){ //Validations if(obstacleGrid==null||obstacleGrid.length==0||obstacleGrid..
分类:其他好文   时间:2015-01-04 11:34:38    阅读次数:116
[LeetCode]64 Minimum Path Sum
https://oj.leetcode.com/problems/minimum-path-sum/http://blog.csdn.net/linhuanmars/article/details/22257673publicclassSolution{ publicintminPathSum(int[][]grid){ //Onlymovedownorright. //Otherwise,-oo //Validations. if(grid==null) return-1;//Invalidinput ..
分类:其他好文   时间:2015-01-04 11:34:38    阅读次数:154
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!