码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
[LeetCode]141 Linked List Cycle
https://oj.leetcode.com/problems/linked-list-cycle/http://blog.csdn.net/linhuanmars/article/details/21200601/** *Definitionforsingly-linkedlist. *classListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ publicclassSolution{ publi..
分类:其他好文   时间:2015-01-09 01:52:33    阅读次数:155
[LeetCode]144 Binary Tree Preorder Traversal
https://oj.leetcode.com/problems/binary-tree-preorder-traversal/http://blog.csdn.net/linhuanmars/article/details/21428647/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclassSolu..
分类:其他好文   时间:2015-01-09 01:52:30    阅读次数:274
[LeetCode]143 Reorder List
https://oj.leetcode.com/problems/reorder-list/http://blog.csdn.net/linhuanmars/article/details/21503215/** *Definitionforsingly-linkedlist. *classListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ publicclassSolution{ publicvoid..
分类:其他好文   时间:2015-01-09 01:51:44    阅读次数:175
[LeetCode]142 Linked List Cycle II
https://oj.leetcode.com/problems/linked-list-cycle-ii/http://blog.csdn.net/linhuanmars/article/details/21260943/** *Definitionforsingly-linkedlist. *classListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ publicclassSolution{ pu..
分类:其他好文   时间:2015-01-09 01:51:33    阅读次数:173
[LeetCode]147 Insertion Sort List
https://oj.leetcode.com/problems/insertion-sort-list/http://blog.csdn.net/linhuanmars/article/details/21144553/** *Definitionforsingly-linkedlist. *publicclassListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ publicclassSolutio..
分类:其他好文   时间:2015-01-09 01:50:04    阅读次数:172
[LeetCode]146 LRU Cache
https://oj.leetcode.com/problems/lru-cache/http://blog.csdn.net/linhuanmars/article/details/21310633publicclassLRUCache{ publicLRUCache(intcapacity){ map=newHashMap<>(); head=null; tail=null; this.size=0; this.capacity=capacity; } publicintget(intke..
分类:系统相关   时间:2015-01-09 01:49:29    阅读次数:220
[LeetCode]135 Candy
https://oj.leetcode.com/problems/candy/http://blog.csdn.net/linhuanmars/article/details/21424783publicclassSolution{ publicintcandy(int[]ratings){ //从左边向右边遍历 //如果这个比前一个大,++ //否则持平 //这样保证左右小孩和他右边的人比较是合法的 // //同理向..
分类:其他好文   时间:2015-01-08 18:16:42    阅读次数:155
[LeetCode]136 Single Number
https://oj.leetcode.com/problems/single-number/http://blog.csdn.net/linhuanmars/article/details/22648829publicclassSolution{ publicintsingleNumber(int[]A) { //SolutionA //returnsingleNum_Xor(A); //SolutionB returnsingleNum_BitCompare(A); //SolutionC //ret..
分类:其他好文   时间:2015-01-08 18:16:14    阅读次数:141
[LeetCode]137 Single Number II
https://oj.leetcode.com/problems/single-number-ii/http://blog.csdn.net/linhuanmars/article/details/22645599publicclassSolution{ publicintsingleNumber(int[]A){ returnsingleNumber_BitCompare(A,3); } privateintsingleNumber_BitCompare(int[]A,intk) { inttoRetur..
分类:其他好文   时间:2015-01-08 18:15:42    阅读次数:200
[LeetCode]138 Copy List with Random Pointer
https://oj.leetcode.com/problems/copy-list-with-random-pointer/http://blog.csdn.net/linhuanmars/article/details/22463599/** *Definitionforsingly-linkedlistwitharandompointer. *classRandomListNode{ *intlabel; *RandomListNodenext,random; *RandomListNode(intx)..
分类:其他好文   时间:2015-01-08 18:15:38    阅读次数:106
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!