![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
文章平均质量分 81
麻麻木木
没有天生的高手,也没有永远的菜鸟!每天进步一点点
展开
-
动态创建链表
#include <stdio.h>#include <stdlib.h>//使用结构体类型,动态创建链表,查找,插入,删除typedef struct list{int data;struct list *next;}LIST;//typedef重命名 将结构体类型命名为LIST//创建链表LIST *creat_list(){int c;LIST *head,*s,*r;head =(LIST *)malloc(sizeof(LIST));//生成头结点原创 2021-11-22 16:52:33 · 728 阅读 · 0 评论 -
顺序表操作
//顺序表操作 建立 查找 插入 删除#include <iostream#define OK 1#define ERROR 0#define OVERFLOW -1 //判断是否溢出的时候要使用#define MAXSIZE 100using namespace std;typedef int ElemType;typedef int Status;typedef struct{int *elem;int length;}SqList;//顺序表存储结构类型为 SqList原创 2022-04-02 21:16:56 · 275 阅读 · 0 评论