码迷,mamicode.com
首页 >  
搜索关键字:linked_list    ( 3784个结果
234. 回文链表
请判断一个链表是否为回文链表。 示例 1: 输入: 1->2 输出: false 示例 2: 输入: 1->2->2->1 输出: true /** * Definition for singly-linked list. * public class ListNode { * int val; * ...
分类:其他好文   时间:2020-04-04 19:01:43    阅读次数:62
147. 对链表进行插入排序
1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), next(NULL) {} 7 * }; ...
分类:编程语言   时间:2020-04-03 12:22:52    阅读次数:63
leetcode-面试题6-从尾到头打印链表
题目描述: java /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; } * } */ class ...
分类:其他好文   时间:2020-04-02 17:39:14    阅读次数:49
leetcode 82 Remove Duplicates from Sorted List II
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solu ...
分类:其他好文   时间:2020-04-01 16:35:39    阅读次数:55
109. 有序链表转换二叉搜索树
1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), next(NULL) {} 7 * }; ...
分类:其他好文   时间:2020-04-01 15:00:17    阅读次数:56
1097 Deduplication on a Linked List
Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each va ...
分类:其他好文   时间:2020-04-01 00:34:43    阅读次数:61
leetcode-876
额,快慢指针,单指针是没必要当作题来做的。 /** * Definition for singly-linked list. * type ListNode struct { * Val int * Next *ListNode * } */ func middleNode(head *ListNo ...
分类:其他好文   时间:2020-03-23 23:35:00    阅读次数:115
83. 删除排序链表中的重复元素
1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), next(NULL) {} 7 * }; ...
分类:编程语言   时间:2020-03-22 01:19:40    阅读次数:66
237. 删除链表中的节点
1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), next(NULL) {} 7 * }; ...
分类:其他好文   时间:2020-03-21 23:09:33    阅读次数:48
Linked List
#include <iostream>#include <string>using namespace std;struct Node{ Node() :value(0), pNext(nullptr) {} int value; Node* pNext;};class CLinkList{priv ...
分类:其他好文   时间:2020-03-21 09:52:22    阅读次数:56
3784条   上一页 1 ... 13 14 15 16 17 ... 379 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!