码迷,mamicode.com
首页 >  
搜索关键字:linked_list    ( 3784个结果
142. Linked List Cycle II
1. 原始题目 Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the given linked list, ...
分类:其他好文   时间:2019-04-06 12:34:36    阅读次数:111
数据结构——集合有关
栈(stack):先进后出; 队列(queue):先进先出; 数组(Array):有序的元素序列;查询快(数组的地址是连续的),增删慢; 链表(linked list):由一系列结点node(链表中的每一个元素称为结点)组成, 二叉树——红黑树: ...
分类:其他好文   时间:2019-04-05 20:18:34    阅读次数:163
876. Middle of the Linked List
1. 原始题目 Given a non-empty, singly linked list with head node head, return a middle node of linked list. If there are two middle nodes, return the seco ...
分类:其他好文   时间:2019-04-05 16:54:43    阅读次数:153
707. Design Linked List
1. 原始题目 Design your implementation of the linked list. You can choose to use the singly linked list or the doubly linked list. A node in a singly link ...
分类:其他好文   时间:2019-04-05 12:35:56    阅读次数:149
83. Remove Duplicates from Sorted List
1. 原始题目 Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Example 2: 2. 题目理解 给定一个排序链表,删除所有重复的元素,使得 ...
分类:其他好文   时间:2019-04-05 12:14:40    阅读次数:140
61. Rotate List
1. 原始题目 Given a linked list, rotate the list to the right by k places, where k is non-negative. Example 1: Example 2: 2. 题目理解 给定一个链表,旋转链表,将链表每个节点向右移动  ...
分类:其他好文   时间:2019-04-04 23:08:26    阅读次数:252
206. Reverse Linked List
1. 原始题目 Reverse a singly linked list. Example: 2. 题目理解 反转一个单链表 注意:空链表的处理,单个结点的处理 3. 解法 因为在反向指向结点的时候容易导致链表出现断裂,所以需3个结点保存当前结点,当前结点之前,之后的结点。 4. 验证结果 1 1 ...
分类:其他好文   时间:2019-04-04 15:46:51    阅读次数:132
Leetcode-1030 Next Greater Node In Linked List(链表中的下一个更大节点)
最后一个样例是特判过的 ...
分类:其他好文   时间:2019-03-31 13:34:09    阅读次数:131
LeetCode 206 Reverse Linked List 解题报告
题目要求 Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL 题目分析及思路 给定一个单链表,要求得到它的逆序。可以使用列表对链表结点进行保存,之后新建一个列表对链 ...
分类:其他好文   时间:2019-03-30 10:36:25    阅读次数:187
【leetcode】109. Convert Sorted List to Binary Search Tree
题目如下: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balance ...
分类:其他好文   时间:2019-03-30 10:34:39    阅读次数:115
3784条   上一页 1 ... 41 42 43 44 45 ... 379 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!