码迷,mamicode.com
首页 >  
搜索关键字:linked_list    ( 3784个结果
1097 Deduplication on a Linked List (25)
Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each va ...
分类:其他好文   时间:2018-06-11 15:45:08    阅读次数:166
1074 Reversing Linked List (25)
Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, ...
分类:其他好文   时间:2018-06-11 13:50:45    阅读次数:159
147. Insertion Sort List
问题描述: Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted list (black) initially contains only the firs ...
分类:其他好文   时间:2018-06-11 11:04:18    阅读次数:165
148. Sort List
问题描述: Sort a linked list in O(n log n) time using constant space complexity. Example 1: Example 2: 解题思路: 说到O(nlogn)那就必然想到快速排序和归并排序和堆排序 参考大佬整理的方法 代码: 归 ...
分类:其他好文   时间:2018-06-11 11:01:16    阅读次数:176
82. 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. Example 1: Examp ...
分类:其他好文   时间:2018-06-10 12:11:26    阅读次数:144
Remove Nth Node From End of List LeetCode Java
描述Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2.Aer remo ...
分类:编程语言   时间:2018-06-09 22:04:32    阅读次数:170
Reverse Nodes in k-Group LeetCode Java
描述Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then ...
分类:编程语言   时间:2018-06-09 20:30:42    阅读次数:166
ALGORITHM3.1 Sequential search (in an unordered linked list)
import edu.princeton.cs.algs4.*; public class SequentialSearchST { private Node first; private class Node { Key key; Value val; Node next; p... ...
分类:其他好文   时间:2018-06-07 21:52:14    阅读次数:153
92. Reverse Linked List II
问题描述: Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. Example: 解题思路: 这里要求翻转第m个节点到第n个节点的顺序。 我们可以先通过m与n ...
分类:其他好文   时间:2018-06-05 13:31:03    阅读次数:175
6.4 Linked List 重做
```java PriorityQueue queue= new PriorityQueue(lists.length,new Comparator(){ @Override public int compare(ListNode o1,ListNode o2){ if (o1.val ...
分类:其他好文   时间:2018-06-04 14:34:36    阅读次数:109
3784条   上一页 1 ... 67 68 69 70 71 ... 379 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!