网站首页  英汉词典

请输入您要查询的英文单词:

 

单词 Knuth Morris Pratt algorithm
释义

Knuth Morris Pratt algorithm

中文百科

克努斯-莫里斯-普拉特算法 Knuth–Morris–Pratt algorithm

(重定向自Knuth Morris Pratt algorithm)

在计算机科学中,Knuth-Morris-Pratt 字符串查找算法(常简称为“KMP算法”)可在一个主“文本字符串”S内查找一个“词”W的出现位置。此算法通过运用对这个词在不匹配时本身就包含足够的信息来确定下一个匹配将在哪里开始的发现,从而避免重新检查先前匹配的字符。

这个算法是由高德纳(Donald Ervin Knuth)和沃恩·普拉特在1974年构思,同年詹姆斯·H·莫里斯也独立地设计出该算法,最终由三人于1977年联合发表。

注意:在本文中,我们将使用始于零的数组来表示我们的字符串。所以在下面例子中,我们用W[2]来表示字符串W中的字符'C'。这种表示遵从C语言的语法。

英语百科

Knuth–Morris–Pratt algorithm 克努斯-莫里斯-普拉特算法

(重定向自Knuth Morris Pratt algorithm)

In computer science, the Knuth–Morris–Pratt string searching algorithm (or KMP algorithm) searches for occurrences of a "word" W within a main "text string" S by employing the observation that when a mismatch occurs, the word itself embodies sufficient information to determine where the next match could begin, thus bypassing re-examination of previously matched characters.

随便看

 

英汉网英语在线翻译词典收录了3779314条英语词汇在线翻译词条,基本涵盖了全部常用英语词汇的中英文双语翻译及用法,是英语学习的有利工具。

 

Copyright © 2004-2024 encnc.com All Rights Reserved
更新时间:2025/6/21 21:59:13