About Cacher
Web App
Download
Sign In
Sign Up
menu
Cacher is the code snippet organizer for pro developers
We empower you and your team to get more done, faster
Learn More
Missmiaom
3/18/2020 - 2:04 AM
share
Share
add_circle_outline
Save
搜索关键词&寻找文章最长重复词
1
content_copy
file_download
Rendered
Source
搜索关键词
需求
:
在一个字符串中查找是否存在关键词。
思路
:
先将字符串分离成由初始值递增的字符串数组。
进行MSD排序
二分查找
寻找最长重复词
需求
:
在一个字符串中查找最长重复词。
思路
:
先将字符串分离成由初始值递增的字符串数组。
进行MSD排序
依次两两对比,计算出重复词
clear