Java实现AC自动机全文检索

实现参考博客:http://www.cppblog.com/mythit/archive/2009/04/21/80633.html 第一步,构建Trie树,定义Node类型: /**
* Created by zhaoyy on 2017/2/7.
*/
interface Node {

char value();

boolean exists();

boolean isRoot();

Node parent();

Node childOf(char c);

Node fail();…