码迷,mamicode.com
首页 >  
搜索关键字:linked_list    ( 3784个结果
237. Delete Node in a Linked List
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Given linked list head = [4,5,1,9], which ...
分类:其他好文   时间:2018-10-20 12:15:36    阅读次数:147
leetcode141 Linked List Cycle
思路: floyed判环法。 https://www.youtube.com/watch?v=LUm2ABqAs1w 实现: ...
分类:其他好文   时间:2018-10-20 00:46:47    阅读次数:143
203. Remove Linked List Elements
一、题目 1、审题 2、分析 将链表中值为 val 的节点去除。 二、解答 1、思路: 方法一、 创建一个头结点,将后边的值为 val 的节点一一删除。 优化: 采用 pre、cur 指针,使代码更简洁 方法二、 采用递归 ...
分类:其他好文   时间:2018-10-19 23:40:44    阅读次数:171
141. Linked List Cycle
Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? ...
分类:其他好文   时间:2018-10-18 16:52:36    阅读次数:111
[leetcode]426. Convert Binary Search Tree to Sorted Doubly Linked List二叉搜索树转有序双向链表
Convert a BST to a sorted circular doubly-linked list in-place. Think of the left and right pointers as synonymous to the previous and next pointers i ...
分类:其他好文   时间:2018-10-18 10:57:59    阅读次数:180
【LeetCode】linked list(共34题)
【2】Add Two Numbers 【19】Remove Nth Node From End of List 【21】Merge Two Sorted Lists 【23】Merge k Sorted Lists 【24】Swap Nodes in Pairs 【25】Reverse Nodes ...
分类:其他好文   时间:2018-10-16 13:41:14    阅读次数:240
[LeetCode] 86. Partition List 划分链表
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the ...
分类:其他好文   时间:2018-10-16 10:16:21    阅读次数:162
02-线性结构3 Reversing Linked List
Given a constant K and a singly linked list L, you are supposed to reverse the links of every Kelements on L. For example, given L being 1→2→3→4→5→6, ...
分类:其他好文   时间:2018-10-15 14:57:57    阅读次数:171
24. Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head. Example: Given 1 2 3 4, you should return the list as 2 1 4 3. Note: Your algo ...
分类:其他好文   时间:2018-10-14 14:15:45    阅读次数:119
[leetcode]237.Delete Node in a Linked List
题目 Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Given linked list head = [4,5,1,9], wh ...
分类:其他好文   时间:2018-10-14 14:08:12    阅读次数:160
3784条   上一页 1 ... 55 56 57 58 59 ... 379 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!