- 博客(13)
- 收藏
- 关注
原创 KMP Algorithm‘s summary
Overview of KMP AlgorithmKMP is an algorithm for efficient pattern matching between strings. It does this by processing the pattern string so that when matching the pattern to the target string, you ...
2019-11-10 17:23:49 148
原创 解决升级完pip后无法使用pip的问题
一、问题由来问题是这么来着,由于需要在我的windows系统下用cmd输入pip指令(pip install opencv-python)安装opencv-python库的,但是由于没有使用–user,即刚开始没有权限,但同时它有提示说我的pip可以更新到最新版本。故我就先更新了(python -m pip install --upgrade pip),显示更新成功,但痛苦的开始就在这。我更新完...
2019-11-06 12:21:10 6896
原创 KMP算法 自我总结
一、概述KMP算法KMP是用于串之间的高效模式匹配的一种算法。它通过对模式串进行处理,从而使得在与目标串进行模式匹配时,不用回溯遍历目标串的变量。之所以高效,是因为它将匹配的效率从Brute-Force的O(m*n)提升到O(m+n).//m,n分别为模式串和目标串的长度二、核心理解*首先说下,在暴力解法中,当遍历目标串时遇到不符合的字符时,遍历变量i(**i是遍历目标串的变量名**)会回...
2019-11-05 17:47:26 812
原创 关于include <iostream> using namespace std; 的新发现
#关于include using namespace std; 的新发现在代码#include <stdlib.h>#include<stdio.h>#define MaxSize 40int next[MaxSize];void GetNext(SqString t){int j, k; j = 0; k = -1; next[0] = -1;w...
2019-11-03 16:33:22 2834
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人