strstr - 字符串匹配

做字符串匹配,leetcode 28题,实现strstr函数,在一个字符串中去找是否存在另一个字符串。暴力解,直接扫O(n^2),C++中该函数也是这么实现的。
因为在扫的过程中会存在一些已经扫过的重新扫,记录一下相关信息减少复杂度到O(n),就是KMP算法。

参考

http://www.cppblog.com/suiaiguo/archive/2009/07/16/90237.html

kanxue crackme 1 priority queue
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×