码迷,mamicode.com
首页 >  
搜索关键字:linked_list    ( 3784个结果
1.3.26
question; write a method remove() that takes a linked list and a string key as arguments and removes all of the nodes in the list that have key as its ...
分类:其他好文   时间:2018-05-19 14:47:01    阅读次数:214
1.3.27
question: write a method max() that takes a reference to the first node in a linked list as argument and returns the value of the maxnimun key in the ...
分类:其他好文   时间:2018-05-19 14:41:29    阅读次数:176
1.3.24
question: write a method removeafter() that takes a linked-list node as argument and removes the node following the given one(and does nothing if the ...
分类:其他好文   时间:2018-05-19 14:02:53    阅读次数:124
1.3.25
question: write a method insertafter() that takes two linked-list node arguments and inserts the second after the first on its list(and does nothing i ...
分类:其他好文   时间:2018-05-19 14:02:19    阅读次数:152
1.3.22
question: suppose that x is a linked list node. what does the following code fragment do? answer: inserts node t immediately after node x. ...
分类:其他好文   时间:2018-05-19 13:10:18    阅读次数:155
1.3.21
question: write a method find() that takes a linked list and a string key as arguments and returns true if some node in the list has the key as its it ...
分类:其他好文   时间:2018-05-19 13:03:05    阅读次数:152
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 al... ...
分类:其他好文   时间:2018-05-18 00:35:22    阅读次数:168
5.15 - Stacks and Queues
Solution1: Reverse and Compare 翻转整个Linked List, 然后用两个指针进行逐一比对 Solution2: Iterative Approach use Stack java class Result { public ListNode node; public ...
分类:其他好文   时间:2018-05-17 11:59:36    阅读次数:151
leetcode.142 LinkedList Cycle II
问题描述: Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. 我的思路: 在Link ...
分类:其他好文   时间:2018-05-17 11:52:54    阅读次数:134
LeetCode234. Palindrome Linked List
问题描述: Given a singly linked list, determine if it is a palindrome. Example 1: Example 2: 我的思路: 现将链表里的值存储到一个vector中,然后在对vector从两边向中心对比,空间复杂度为O(n), 时间复杂 ...
分类:其他好文   时间:2018-05-17 11:50:26    阅读次数:160
3784条   上一页 1 ... 69 70 71 72 73 ... 379 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!