![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
大话数据结构
文章平均质量分 92
wenpi_linuxer
这个作者很懒,什么都没留下…
展开
-
KMP算法-动态规划
核心算法核心是回溯子串指针,回溯值从子串next数组找出。相比较朴素的字符串匹配算法,主串指针不再回溯,子串next数组由子串前缀后缀重复字母数量确定。#include <stdio.h>#include <string.h>void get_next(char* T,int *next){ int i,j; i=1; j=0; ne...原创 2020-03-14 23:52:18 · 269 阅读 · 0 评论 -
朴素的字符串匹配算法
#include <stdio.h>#include <string.h>int Index(char* s,char* t,int pos){ int i=pos; int j=0; int len1=strlen(s); int len2=strlen(t); while(i<=len1 && j<...原创 2020-03-14 19:29:20 · 280 阅读 · 0 评论 -
循环队列-数组实现队列ADT
#include <stdio.h>#include <stdlib.h>#define MAXSIZE 100typedef int QElemType;typedef int Status;#define OK 1#define ERROR 0typedef struct{ //结构体定义 QElemType...原创 2020-03-14 19:07:24 · 383 阅读 · 0 评论 -
斐波那契数列-了解递归思想
递归老实说递归有点慢,大量的递归调用会建立函数的副本,耗费大量的时间和内存,主要体现在栈空间的浪费#include <stdio.h>int Fbi(int i){ if(i<2){ return i==0?0:1; } return Fbi(i-1)+Fbi(i-2);}int main(void){ int i;...原创 2020-03-14 18:23:22 · 166 阅读 · 0 评论 -
大话数据结构-链栈ADT实现
#include <stdio.h>#include <stdlib.h>#include <stdbool.h>#define MAXSIZE 100typedef int SElemType;typedef int Status;#define ERROR 0#define TRUE 1#define OK 1#define FALSE 0...原创 2020-03-14 17:47:38 · 174 阅读 · 0 评论 -
大话数据结构-数组结构栈的实现
#include <stdio.h>#include <stdlib.h>#include <stdbool.h>#define MAXSIZE 100typedef int SElemType;typedef int Status;#define ERROR 0#define TRUE 1#define OK 1#define FALSE ...原创 2020-03-14 13:52:23 · 260 阅读 · 0 评论 -
重刷大话数据结构-单链表ADT实现
#include <stdio.h>#include <stdlib.h>#include <stdbool.h>#include <time.h>#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0typedef int Status; //状态type...原创 2020-03-14 12:36:23 · 154 阅读 · 0 评论