[TOC] 题目描述: 给定一个二叉树, "原地" 将它展开为链表。 示例: 给定二叉树 将其展开为: 解法: ...
分类:
其他好文 时间:
2019-04-30 10:53:38
阅读次数:
163
1. Dummy Node 2. Basic skills [LeetCode] 206. Reverse Linked List_Easy tag: Linked List 2. Fast slow pointers ...
分类:
其他好文 时间:
2019-04-30 09:28:06
阅读次数:
100
描述 Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Input: 1->1->2Output: 1->2Example 2: Input: 1 ...
分类:
编程语言 时间:
2019-04-27 00:30:34
阅读次数:
149
Given a linked list, remove the *n*-th node from the end of list and return its head. ...
分类:
其他好文 时间:
2019-04-26 11:10:31
阅读次数:
148
Description Insert a node in a sorted linked list. Description Description Insert a node in a sorted linked list. Insert a node in a sorted linked lis ...
分类:
其他好文 时间:
2019-04-23 19:25:46
阅读次数:
134
228. Middle of Linked List Find the middle node of a linked list. Find the middle node of a linked list. Find the middle node of a linked list. Exampl ...
分类:
其他好文 时间:
2019-04-21 20:32:20
阅读次数:
154
一个多线程的大程序运行的时候崩掉了,屏幕上打出这个: *** glibc detected *** corrupted double-linked list: 0xb78381d8 *** 三个原因 1. int* a = new int(10); delete a; delete a; // < ...
分类:
其他好文 时间:
2019-04-18 20:00:54
阅读次数:
670
简单题二 链表操作 1. (leetcode 204) 求解质数个数 求解质数,使用筛法; python Definition for singly linked list. class ListNode(object): def __init__(self, x): self.val = x se ...
分类:
其他好文 时间:
2019-04-15 09:15:05
阅读次数:
176
1、链表(Linked List) 链表(Linked list)是一种常见的基础数据结构,是一种线性表,但是并不会按线性的顺序存储数据,而是在每一个节点里存到下一个节点的指针(Pointer)。 使用链表结构可以克服数组链表需要预先知道数据大小的缺点,链表结构可以充分利用计算机内存空间,实现灵活的 ...
分类:
编程语言 时间:
2019-04-13 21:47:45
阅读次数:
179