![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
RuGuo_09
前端搬砖工
展开
-
单链表逆序操作-倒插法
首先我们把链表分成两部分,头结点,其他结点;让头结点的next为NULL;然后剩余部分使用倒插法,一个一个的插入的到头结点中;#include<stdio.h>#include<stdlib.h>#include<malloc.h>typedef struct LNode{ int data; struct LNode *next;}Node,*LinkList;int cr原创 2016-11-04 21:02:15 · 2577 阅读 · 0 评论 -
回顾数据结构(2):单循环链表
#include <stdio.h>#include<stdlib.h>#include<malloc.h>typedef struct LNode{ int data; struct LNode *next;}Node,*LinkList;//创建循环链表int createLinkList(LinkList &L,int length){ LinkList he原创 2016-11-05 13:35:07 · 278 阅读 · 0 评论 -
回顾数据结构(3):双向链表
#include<stdio.h>#include<stdlib.h>#include<malloc.h>typedef struct LNode{ int data; struct LNode *next; struct LNode *prior;}Node,*LinkList;//创建双向链表int createLinkList(LinkList &L,int l原创 2016-11-05 13:36:03 · 335 阅读 · 0 评论 -
回顾数据结构(1):单链表
1.链表的结点由数据域和指针域构成: //定义链表结构typedef struct LNode{ ElemType data; struct LNode *next;}Node,*LinkList;2.创建链表://创建链表Status CreateLinkList(LinkList &L,int n){ LinkList p,head; L = (LinkL原创 2016-11-04 19:07:37 · 299 阅读 · 0 评论 -
回归数据结构(4):双向循环链表
双向循环链表的插入,删除的操作如图: #include<stdio.h>#include<stdlib.h>#include<malloc.h>typedef struct LNode{ int data; struct LNode *next; struct LNode *prior;}Node,*LinkList;int createLinkList(LinkLi原创 2016-11-05 15:15:03 · 450 阅读 · 0 评论 -
回顾数据结构(5):队列
#include<stdio.h>#include<stdlib.h>#include<malloc.h>typedef struct Queue{ int data; struct Queue *next;}QNode,*QueuePtr;typedef struct{ QueuePtr front; QueuePtr rear;}LQueue;//初始原创 2016-11-06 13:36:48 · 421 阅读 · 0 评论