![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
goodlunatic
浙江师范大学 软件工程21级在读
展开
-
大一下 数据结构 清华严蔚敏(C语言)版 学习记录——数组和广义表
稀疏矩阵的建立与转置Sample Input6 7 80 1 120 2 92 1 32 5 143 2 244 1 185 0 155 3 -7Sample Output0 12 9 0 0 0 00 0 0 0 0 0 00 3 0 0 0 14 00 0 24 0 0 0 00 18 0 0 0 0 015 0 0 -7 0 0 00 0 0 0 0 1512 0 3 0 18 0、9 0 0 24 0 00 0原创 2022-04-23 16:32:21 · 1205 阅读 · 1 评论 -
大一下 数据结构 清华严蔚敏(C语言)版 学习记录——树和二叉树
#include<bits/stdc++.h>#define MAX_TREE_SIZE 100//二叉树的最大结点数#define OK 1#define OVERFLOW -2#define ERROR 0typedef TElemType SqBiTree[MAX_TREE_SIZE];//0号单元存储根节点typedef int Status;SqBiTree bt;typedef struct BiTree{ TElemType data; stru.原创 2022-03-30 16:52:58 · 1587 阅读 · 0 评论 -
大一下 数据结构 清华严蔚敏(C语言)版 学习记录——串【模式匹配(KMP)】
给定一个源串s和n个子串stri。判断stri是否是s的子串。#include <bits/stdc++.h>using namespace std;char S[100005],T[100005];int nextt[100005];//-----------------------------------函数声明区------------------------------------------int index(char S[],char T[],int pos);//朴原创 2022-03-24 13:21:43 · 663 阅读 · 0 评论 -
大一下 数据结构 清华严蔚敏(C语言)版 学习记录——栈和队列
#include<bits/stdc++.h>#define STACK_INIT_SIZE 100//栈的长度#define STACKINCREMENT 10//每次增加的长度#define OK 1#define OVERFLOW -2#define ERROR 0typedef char SElemType;typedef int Status;//---------------------------------------结构体定义区----------------.原创 2022-03-16 11:11:08 · 1151 阅读 · 0 评论 -
大一下 数据结构 清华严蔚敏(C语言)版 学习记录——链表
#include<bits/stdc++.h>#define Status intusing namespace std;typedef long long ll;typedef int ElemType;const int maxn=3000;const ll INF=1e18;/* typedef struct item{ int expn;//定义数据域的数据类型}ElemType; */typedef struct Lnode//定义结点{ .原创 2022-03-04 10:31:39 · 1034 阅读 · 0 评论