11 2021 档案
摘要:https://www.bilibili.com/video/BV1TL411b7V3/?spm_id_from=autoNext https://www.bilibili.com/video/BV1Ju411Z7ki/?spm_id_from=333.788.recommend_more_vide
阅读全文
摘要:https://www.bilibili.com/video/BV1hV411t7SC/?spm_id_from=trigger_reload https://www.bilibili.com/video/BV1dK411Z7qA/?spm_id_from=trigger_reload&vd_sou
阅读全文
摘要:#include <iostream>#include "stdio.h"#include "stdlib.h"#include "cstdlib"//syste()函数需要该头文件; using namespace std; #define OK 1#define ERROR 0#define O
阅读全文
摘要:#include <iostream>#include "stdio.h"#include "stdlib.h"#include "cstdlib"//syste()函数需要该头文件; using namespace std; #define OK 1#define ERROR 0#define O
阅读全文
摘要:1、树转换为二叉树 由于二叉树是有序的,为了避免混淆,对于无序树,我们约定树中的每个结点的孩子结点按从左到右的顺序进行编号。 将树转换成二叉树的步骤是: (1)加线,图例红色。就是在所有兄弟结点之间(同一层同一双亲结点的结点间)加一条连线; (2)抹线。就是对树中的每个结点,只保留他与第一个孩子结点
阅读全文
摘要:一、函数指针 先看一个例子: #include<stdio.h> #include<stdlib.h> #include<string.h> #define ERROR 0 #define OK 1 int add(int a,int b){ return a+b; } int multiply(i
阅读全文
摘要:#include <iostream>#include "stdio.h"#include "stdlib.h"#include "cstdlib"//syste()函数需要该头文件; using namespace std; #define OK 1#define ERROR 0//#define
阅读全文
摘要:讲这两算法之前,我们首先了解几个概念: 串:又称字符串,是由零个或多个字符组成的有限序列,如S="abcdef"。 子串:串中任意个连续的字符组成的子序列,称为该串的子串,原串称为子串的主串。如T="cde",T是S的子串。子串在主串中的位置,用子串的第一个字符在主串中出现的位置表示,T在S中的位置
阅读全文
摘要://通过计算返回子串T的next数组void get_next(String T, int next[]){ next[1] = 0; int m, j; m = 0; //m=next[1], m代表的是前缀结束时的下标,也就是相似度,是等价的 T1T2...Tm(m个字符) j = 1; //j
阅读全文
摘要:#include <iostream>#include "stdio.h"#include "stdlib.h" using namespace std; #define OK 1#define ERROR 0#define OVERFLOW -2typedef int Status;typedef
阅读全文