码迷,mamicode.com
首页 >  
搜索关键字:linked    ( 5490个结果
LeetCode::Remove Duplicates from Sorted List II [具体分析]
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2-...
分类:其他好文   时间:2014-07-07 16:17:00    阅读次数:139
Problem Linked List Cycle
Problem Description:Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?Solution: 1 public bo....
分类:其他好文   时间:2014-07-07 16:08:01    阅读次数:151
leetcode - Merge Two Sorted Lists
题目:Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the ...
分类:其他好文   时间:2014-07-07 14:06:19    阅读次数:221
leetcode - Linked List Cycle II
题目:Linked List Cycle IIGiven a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it withou...
分类:其他好文   时间:2014-07-07 13:44:29    阅读次数:281
[leetcode] Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once.
分类:其他好文   时间:2014-07-02 00:33:49    阅读次数:204
[leetcode] Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
分类:其他好文   时间:2014-07-02 00:24:04    阅读次数:284
LeetCode Partition List
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *...
分类:其他好文   时间:2014-06-30 23:36:56    阅读次数:211
Copy List with Random Pointer
题目 A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy of the list. 方法 publi...
分类:其他好文   时间:2014-06-30 19:36:33    阅读次数:163
Flatten Binary Tree to Linked List
题目 Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / 2 5 / \ 3 4 6 The flattened tree should look lik...
分类:其他好文   时间:2014-06-30 18:13:31    阅读次数:229
LeetCode Reverse Linked List II
class Solution {public: ListNode *reverseBetween(ListNode *head, int m, int n) { if (head == NULL || n 0) { pre = cur; ...
分类:其他好文   时间:2014-06-30 15:36:26    阅读次数:148
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!