44

[算法总结] 13 道题搞定 BAT 面试——字符串

 5 years ago
source link: https://juejin.im/post/5b8f9aed6fb9a05d2e1b75d9
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
本文首发于我的个人博客:尾尾部落 1. KMP 算法 谈到字符串问题,不得不提的就是 KMP 算法,它是用来解决字符串查找的问题,可以在一个字符串(S)中查找一个子串(W)出现的位置。KMP 算法把字符匹配的时间复杂度缩小到 O(m+n) ,而空间复杂度也只

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK