码迷,mamicode.com
首页 >  
搜索关键字:linked_list    ( 3784个结果
114. Flatten Binary Tree to Linked List【Medium】【将给定的二叉树转化为“只有右孩子节点”的链表(树)】
Given a binary tree, flatten it to a linked list in-place. For example, given the following tree: 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look ...
分类:其他好文   时间:2019-02-26 00:48:34    阅读次数:254
19.2.23 [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 ...
分类:其他好文   时间:2019-02-23 10:19:25    阅读次数:193
LeetCode 单链表专题 (一)
[TOC] LeetCode 单链表专题 $[2]$ Add Two Numbers 模拟,注意最后判断进位是否为1。 时间复杂度 $O(n)$ $[92]$ Reverse Linked List II 给定链表,翻转第m个结点到第n个结点。 从第m+1个结点开始,在第m 1个结点之后的位置用 头 ...
分类:其他好文   时间:2019-02-23 01:32:44    阅读次数:231
141. Linked List Cycle(判断l链表是否有环)(leetcode)
Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked list, we use an integer pos which represents the posi ...
分类:其他好文   时间:2019-02-22 18:14:04    阅读次数:148
#Leetcode# 92. Reverse Linked List II
https://leetcode.com/problems/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. ...
分类:其他好文   时间:2019-02-20 21:41:21    阅读次数:179
19. Remove Nth Node From End of List
Given a linked list, remove the n-th node from the end of list and return its head. Example: Given linked list: 1->2->3->4->5, and n = 2. After removi ...
分类:其他好文   时间:2019-02-20 20:05:36    阅读次数:185
19. Remove Nth Node From End of List(js)
19. Remove Nth Node From End of List Given a linked list, remove the n-th node from the end of list and return its head. Example: ...
分类:Web程序   时间:2019-02-16 13:35:00    阅读次数:191
25. Reverse Nodes in k-Group(js)
25. Reverse Nodes in k-Group Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer ...
分类:Web程序   时间:2019-02-16 13:32:52    阅读次数:205
24. Swap Nodes in Pairs(js)
24. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. You may not modify the values in the list's nodes, onl ...
分类:Web程序   时间:2019-02-16 13:20:04    阅读次数:157
[Lintcode]98. Sort List/[Leetcode]148. Sort List
"98. Sort List" / "148. Sort List" 本题难度: Medium Topic: Linked List Description Sort a linked list in O(n log n) time using constant space complexity. ...
分类:其他好文   时间:2019-02-14 20:57:25    阅读次数:166
3784条   上一页 1 ... 44 45 46 47 48 ... 379 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!