
leetcode
juary_01
一个菜鸟成长的记录
展开
-
1.Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, where原创 2015-04-03 20:17:50 · 366 阅读 · 0 评论 -
leetcode
Code Gankerblog.youkuaiyun.com/linhuanmars?viewmode=contentsGrandyangwww.cnblogs.com/grandyang/p/4606334.htmlAcm之家www.acmerblog.comelton_xiaoblog.youkuaiyun.com/elton_xiao/article/category/2原创 2015-07-29 17:06:24 · 379 阅读 · 0 评论 -
AC自动机
一:概念首先简要介绍一下AC自动机:Aho-Corasick automation,该算法在1975年产生于贝尔实验室,是著名的多模匹配算法之一。一个常见的例子就是给出n个单词,再给出一段文章(长度是m),让你找出有多少个单词在文章里出现过。要搞懂AC自动机,先得有字典树Trie的基础知识(也有人说需要KMP的知识,我觉得暂且不要理会这个。但是在看这篇文章之前,Trie字典树,你是必须要先转载 2016-08-23 11:00:20 · 733 阅读 · 0 评论