⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exam4-4.cpp

📁 数据结构c++-书的一些源代码
💻 CPP
字号:
#include <string.h>
#include <iostream.h>
#include <stdlib.h>

#include "Exam4-2String.h"						//包含顺序串类

void main(void)
{
//	String s = ("cddcdc"), t = ("abcde");		//测试例子1
	String s = ("aaaaaaaa"), t = ("aaaab");		//测试例子2

	int i = s.FindSubstr(t, 0);
	cout << "Brute-Force算法比较次数: " << i << endl;

	i = s.KMPFindSubstr(t, 0);
	cout << "KMP算法比较次数: " << i << endl;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -