本文同步发布在CSDN:https://blog.csdn.net/weixin_44385565/article/details/91157982 1097 Deduplication on a Linked List (25 分) 1097 Deduplication on a Linked L ...
分类:
其他好文 时间:
2019-06-07 22:46:15
阅读次数:
138
题目描述: Sort a linked list in O(n log n) time using constant space complexity. Example 1: Example 2: 代码: ...
分类:
其他好文 时间:
2019-06-07 11:08:15
阅读次数:
78
题目链接:https://leetcode.com/problems/reverse-linked-list-ii/ 解题思路: ...
分类:
其他好文 时间:
2019-06-05 00:08:04
阅读次数:
115
1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), next(NULL) {} //初始化当... ...
分类:
其他好文 时间:
2019-06-04 17:48:00
阅读次数:
90
Sort a linked list using insertion sort. Example 1: Example 2: ...
分类:
编程语言 时间:
2019-06-04 12:34:43
阅读次数:
96
138. Copy List with Random Pointer A linked list is given such that each node contains an additional random pointer which could point to any node in t ...
分类:
Web程序 时间:
2019-06-03 23:37:49
阅读次数:
155
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. Given a singly linked list where element ...
分类:
其他好文 时间:
2019-06-03 23:35:02
阅读次数:
108
mycode 93.97% 参考: 其实第二个if可以只写root.left,这样阔以快一丢丢啦 ...
分类:
其他好文 时间:
2019-06-03 17:28:22
阅读次数:
84
原题链接在这里:https://leetcode.com/problems/next-greater-node-in-linked-list/ 题目: We are given a linked list with head as the first node. Let's number the n ...
分类:
其他好文 时间:
2019-06-03 14:28:07
阅读次数:
137