![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
单链表
TLpigff
这个作者很懒,什么都没留下…
展开
-
C语言实现单链表
List.h#ifndef _LIST_H_#define _LIST_H_#include <stdio.h>#include <Windows.h>#include <assert.h>#include <malloc.h>typedef int DataType;typedef struct ListNode{ DataType _data; struct ListN原创 2017-06-14 20:36:06 · 343 阅读 · 0 评论 -
单链表的一些基本操作
顺序表与链表各自的优缺点: 1. 顺序表支持随机访问,单链表不支持随机访问。 2. 顺序表插入 / 删除数据效率很低,时间复杂度为O(N)(除尾插尾删),单链表插入 / 删除效率更高,时间复杂度为O(1)。 3. 顺序表的CPU高速缓存效率更高,单链表CPU高速缓存效率低1.倒着打印单链表void PrintTailToHead(ListNode* pList)//倒着打印单原创 2017-06-19 10:33:38 · 366 阅读 · 0 评论