随笔分类 -  算法:AC自动机

摘要:题目 Bob has a dictionary with N words in it. Now there is a list of words in which the middle part of the word has continuous letters disappeared. The 阅读全文
posted @ 2019-03-03 20:54 zeroy0410 阅读(105) 评论(0) 推荐(0)
摘要:题目 As we all know, Harry Porter learns magic at Hogwarts School. However, learning magical knowledge alone is insufficient to become a great magician. 阅读全文
posted @ 2019-03-03 10:45 zeroy0410 阅读(126) 评论(0) 推荐(0)
摘要:概述 应用场景: 多模字符串匹配问题 。 KMP解决的问题是两个字符串之间的互相匹配,而如果有多个字符串要和一个字符串进行匹配呢?如果还用KMP的话,复杂度依然上天,所以,一个正常的想法是在KMP的基础上堆数据结构。 所以AC自动机=在Trie树上跑KMP,它其中也存在失配数组,与KMP类似。 初见 阅读全文
posted @ 2019-02-24 21:02 zeroy0410 阅读(125) 评论(0) 推荐(0)