![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言数据结构
Yyx342779418
这个作者很懒,什么都没留下…
展开
-
链表逆序的实现(修改指针)
用C语言,建立一个普通的链表后通过修改指针,将链表的头尾颠倒(逆序)#include<stdio.h>#include<stdbool.h>#include<stdlib.h>#define TYPE int typedef struct Node { TYPE data; struct Node* next;}Node;Node* c...原创 2019-07-14 10:40:42 · 313 阅读 · 0 评论 -
C语言 建立双向链表
#include <stdio.h>#include <stdlib.h>#include <stdbool.h>#define TYPE inttypedef struct Node{ struct Node* prev; // 前一个元素 TYPE data; // 数据 struct Node* next; // 后一个元素}No...原创 2019-07-23 10:05:14 · 489 阅读 · 0 评论 -
C语言 建立简单的顺序表队列
#include<stdio.h>#include<stdlib.h>#include<stdbool.h>#define TYPE inttypedef struct Queue{ TYPE* base; int size; //容量 int head; //队头 int tall; //队尾 int cnt; //数量}Queue...原创 2019-07-23 10:11:51 · 174 阅读 · 0 评论 -
C语言 建立简单顺序表
#include<stdio.h>#include<stdbool.h>#include<stdlib.h>#define TYPE int //设计数据结构typedef struct Array{ TYPE* base; //数组首地址 size_t size;//元素的个数}Array;//创建Array* create_arra...原创 2019-07-23 10:09:25 · 1422 阅读 · 0 评论 -
C语言 建立简单的链表队列
#include<stdio.h>#include<stdlib.h>#include<stdbool.h>#define TYPE inttypedef struct Node{ TYPE data; struct Node* next;}Node;Node* creat_node(TYPE data){ Node* node =...原创 2019-07-23 10:14:56 · 172 阅读 · 0 评论 -
C语言 建立简单的栈
#include<stdio.h>#include<stdbool.h>#include<stdlib.h>#define TYPE int typedef struct Stack{ TYPE* arr; //内存首地址 int len; //栈的容量 int top; //栈的下标}Stack;//判断是否为出栈序列bool i...原创 2019-07-23 10:17:19 · 2378 阅读 · 0 评论 -
C语言 建立简单的链表栈
#include<stdio.h>#include<stdlib.h>#include<stdbool.h>#define TYPE inttypedef struct Node{ TYPE data; struct Node* next;}Node;Node* creat_node(TYPE data){ Node* node = ...原创 2019-07-23 10:18:55 · 130 阅读 · 0 评论