码迷,mamicode.com
首页 >  
搜索关键字:linked_list    ( 3784个结果
Leetcode 24——Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your ...
分类:其他好文   时间:2018-03-09 14:11:34    阅读次数:175
LeetCode第[3]题(Java):Longest Substring Without Repeating Characters 标签:Linked List
题目中文:没有重复字符的最长子串 题目难度:Medium 题目内容: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", ...
分类:编程语言   时间:2018-03-08 18:09:56    阅读次数:141
24. Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Your a ...
分类:其他好文   时间:2018-03-08 00:01:07    阅读次数:168
[LeetCode]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? 思路: 判断一个链表是否有环。 * 同个时间Faster走的比Slo ...
分类:其他好文   时间:2018-03-05 11:14:41    阅读次数:181
【Leetcode】109. Convert Sorted List to Binary Search Tree
Question: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-bal ...
分类:其他好文   时间:2018-03-01 14:53:58    阅读次数:133
328. Odd Even Linked List
Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the ...
分类:其他好文   时间:2018-02-27 23:30:00    阅读次数:164
[LeetCode] 19. Remove Nth Node From End of List Java
题目:Given a linked list, remove the nth node from the end of list and return its head. For example, Note:Given n will always be valid.Try to do this in ...
分类:编程语言   时间:2018-02-27 16:02:34    阅读次数:157
【Leetcode】147. Insertion Sort List
Question: Sort a linked list using insertion sort. Tips: 使用插入排序,对一个链表进行排序。 思路: 新建一个头结点newHead,设置一个pre指针,指向newHead。 cur指针,指向原来的头结点head。 当pre.next的值大于cu ...
分类:其他好文   时间:2018-02-27 12:44:39    阅读次数:160
41.leetcode19_remove_nth_node_from_end_of_list
1.题目描述 Given a linked list, remove the nth node from the end of list and return its head. 删除链表中倒数第n个节点 For example, Given linked list: 1->2->3->4->5, ...
分类:其他好文   时间:2018-02-27 01:08:54    阅读次数:180
双向链表实现队列与循环链表
一、双向链表(double linked list)如图26.5,是在单链表的每个结点中,再设置一个指向其前驱结点的指针域。双向链表的基本操作与单链表基本一样,除了插入和删除的时候需要更改两个指针变量,需要注意的是修改的顺序很重要,插入如图3-14-5,删除如图3-14-6。 链表的delete操作 ...
分类:其他好文   时间:2018-02-26 11:32:51    阅读次数:198
3784条   上一页 1 ... 74 75 76 77 78 ... 379 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!