- 博客(4)
- 收藏
- 关注
原创 数据结构——KMP算法(含next值和nextval值的计算)
前言:本文仅仅是贴出代码的实现,具体的计算next值和nextval值的计算若有不懂的可以留言,如果比较多不懂的,可以出一篇文章讲一下我自己是怎么计算的。 #include<bits/stdc++.h> using namespace std; #define MAXLEN 255 typedef struct { char ch[MAXLEN + 1]; int length; }SString; int StringCreate(SString& C, int n
2022-03-29 08:41:18
1446
原创 数据结构——单链表的相关操作
前言:本文是在lady_killer9的博客_优快云博客-网络安全,python,常见算法与数据结构实现领域博主做出相应的修改,完善了部分代码,有不足之处欢迎指正 #include<bits/stdc++.h> using namespace std; #define Status int #define ElemType int typedef struct LNode { ElemType data;//数据域 struct LNode* next;//指针域 }LNode, *
2022-03-26 18:03:20
1570
原创 数据结构——顺序表的相关操作
数据结构课上学来的,代码修改了很久,给大家做个参考吧 头文件 #pragma once #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define OVERFLOW -2 #define MAXSIZE 100 typedef int Status; typedef int ElemType; //自己决定 typedef struct { ElemType* elem;//存储空间的基地址 int length;/..
2022-03-26 17:57:08
1476
原创 数据结构——BF算法
前言: 最近在学数据结构,自己写了一下这个字符串的BF算法的实现,BF还是相对比较简单的一个算法。有不懂的欢迎留言。 代码部分: #include<bits/stdc++.h> using namespace std; #define MAXLEN 255 typedef struct { char ch[MAXLEN + 1]; int length; }SString; int StringCreate(SString& C, int n) { C...
2022-03-24 22:37:32
888
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人