![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
Scruel Tao
12
展开
-
字符串匹配的KMP算法
字符串匹配是计算机的基本任务之一。 举例来说,有一个字符串"BBC ABCDAB ABCDABCDABDE",我想知道,里面是否包含另一个字符串"ABCDABD"? 许多算法可以完成这个任务,Knuth-Morris-Pratt算法(简称KMP)是最常用的之一。它以三个发明者命名,起头的那个K就是著名科学家Donald Knuth。 这种算法不太容转载 2017-03-13 19:21:29 · 261 阅读 · 0 评论 -
lua实现xxTea加解密
不废话,贴代码: function security.xxTEAEncrypt(str, key, toBase64) toBase64 = toBase64 or true if (str == "") then return "" end local v = _str2long(str, true) local k = _str2lo原创 2016-09-30 15:14:29 · 4251 阅读 · 1 评论